`

1329 - No data - zero rows fetched, selected, or proc

 
阅读更多

 

对msql过程的执行使用游标执行过程可以插入相应业务表数据,但是会报一个异常,当在Java中mysql过程会抛出异常1329 - No data - zero rows fetched, selected, or proc

经网上以及个人测试得出以下可以解决异常的方法,同时对再网上发出用正确的方式解决问题的大神说声谢谢。

方式一:

create PROCEDURE test()
BEGIN
   DECLARE _tmp INT default 0;
   DECLARE _stop INT default 0;
 
   DECLARE cur CURSOR FOR  SELECT count(*) from activeUserDetail;
   -- DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
   -- DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET error = 1,done=1;
   DECLARE CONTINUE HANDLER FOR 1329 SET _stop = 1;
   OPEN cur;
   l1:LOOP
  FETCH FROM cur INTO _tmp;
       IF _stop<>1 THEN
             INSERT INTO temp(TEXT_)VALUES(_tmp);
        ELSE
        LEAVE l1;
        END IF;
   end LOOP;
END

 

 

mysql错误:Column count doesn't match value count at row INSERT INTO table_name(col_name1, col_name2, col_name3) VALUES('value1','value2');  

语句中,前后列数不等造成的,仔细检查即可避免

 

 

 

分享到:
评论

相关推荐

    bootstrap-table-reorder-rows.js

    bootstrap-table-reorder-rows.js ,bootstraptable行拖动

    bootstrap-table-reorder-rows.js.zip

    BootStrapTable行内编辑;压缩包内包含行内编辑所需要的js+css; BootStrapTable行内编辑;压缩包内包含行内编辑所需要的js+css;

    Angular-ui-grid-draggable-rows.zip

    Angular-ui-grid-draggable-rows.zip,HTML5拖放功能,用于Angular UI GridDragable Rows插件,用于UI Grid,Angularjs于2016年发布,是Angularjs的重写版。它专注于良好的移动开发、模块化和改进的依赖注入。angular...

    bootstrap-table实现 行拖拽 插件jquery.tablednd.js bootstrap-table-reorder-rows.js

    bootstrap-table实现 行拖拽 插件 jquery.tablednd.js bootstrap-table-reorder-rows.js bootstrap-table-reorder-rows.css

    oracle恢复工具-FY_Recover_Data

    15:33:05: [copy_file] begin copy file: FY_DATA_DIR4\FY_REC_DATA4.DAT =&gt; FY_DATA_DIR4\FY_REC_DATA_COPY.DAT 15:33:05: [copy_file] completed. 15:33:05: Copy file of Recover Tablespace: FY_REC_DATA_COPY...

    Qt5 Data Visualization 3D官方教程配套示例代码

    - Changing most of Q3DScene properties affecting subviewports currently has no effect. - Widget based examples layout incorrectly in iOS. - Reparenting a graph to an item in another QQuickWindow is ...

    orcal课程练习代码

    14 rows selected. SQL&gt; select ename as "emp name" ,sal+comm income from emp; emp name INCOME ---------- ---------- SMITH ALLEN 1900 WARD 1750 JONES MARTIN 2650 BLAKE CLARK SCOTT KING ...

    eclipse +jsp+ servlet+MySQL省市县 三级菜单的查询

    采用Eclipse 编写的关于省市县三级菜单采用JSP +servlet+MYSQL ,数据库表的数据文件在src文件夹中 mysql&gt; show tables; +----------------+ | Tables_in_area | +----------------+ ...4 rows in set (0.00 sec)

    部署wordpress.txt

    4 rows in set (0.00 sec) mysql&gt; create user wpuser@localhost; Query OK, 0 rows affected (0.00 sec) mysql&gt; use mysql; Reading table information for completion of table and column names You can...

    UseMySQL.txt

    1. database express 1.1 show database mysql&gt; show databases; +--------------------+ | Database | +--------------------+ | information_schema | | kevinb | ...4 rows in set (0.03 sec)

    全球地形资料img ETOPO1

    NODATA_value -99999 byteorder LSBFIRST NUMBERTYPE 4_BYTE_FLOAT MIN_VALUE -10898.0 MAX_VALUE 8271.0 An example 2-byte integer header file, of the ETOPO1 Bedrock cell-registered grid (etopo1_bed_c_i2...

    tokio-pg-mapper-Proc-macro库,用于将tokio-postgres行映射到Rust类型(结构)-Rust开发

    tokio-pg-mapper tokio_postgres-mapper是一个proc-macro,旨在使从postgresql表到结构的映射变得简单。 为什么? tokio-pg-mapper可能令人沮丧tokio_postgres-mapper是一个proc-macro,旨在使从postgresql表到结构...

    Hill-Climbing 彩色图像分割

    % IDX = KMEANS(X, K) partitions the points in the N-by-P data matrix % X into K clusters. This partition minimizes the sum, over all % clusters, of the within-cluster sums of point-to-cluster-centroid...

    bootstarp table行拖拽js.rar

    实现bootStarp Table ... { jsondata: JSON.stringify(newData) },//将整张表数据Post,当然,先序列化成Json function(data) { if (data == "success") { $table.bootstrapTable('refresh'); } }); } } });

    JAVA网吧计费管理系统

    | uid | varchar(30) | NO | PRI | 0 | | | password | varchar(30) | NO | | 0 | | | balance | double | NO | | 0 | | | isvip | int(2) | NO | | 0 | | +----------+-------------+------+-----+---------+------...

    MATLAB实现K-means聚类

    'effectively zero.\nEither remove those points, or choose a ', ... 'distance other than ''cosine''.'], []); end % 标量化 Xnorm(:,ones(1,p))得到n*p的矩阵 X = X ./ Xnorm(:,ones(1,p)); case '...

    react-dynamic-data-table:具有可排序列、分页等功能的 React 可重用数据表

    npm install @langleyfoxall/react-dynamic-data-tableyarn add @langleyfoxall/react-dynamic-data-table 请记住在需要的地方导入DynamicDataTable组件。 import DynamicDataTable from "@langleyfoxall/react-...

    FacebookReact组件fixed-data-table.zip

    fixed-data-table 是一个用于以灵活且强有力的方式建立并显示数据的 React 组件。它支持标准的桌面特征,像头条、行、列、头条组、滚动列。此组件在处理数千行数据的时不会牺牲性能。平滑地滚定是 FixedDataTable 的...

    DataGridView is a very powerful tool to display data in tabular format

    - Print selected rows or columns - Center partitions on printed sheet - Page numbering - Optimized DataGridViewTextBoxCell printing - Word wrapping and cell size as presented in the DataGridView ...

    中国 省市区三级级联菜单 数据库Mysql修正版本

    附件名称:gk_diqu.sql 附件用途:制作省市区三级级联菜单数据来源 简单介绍:文件gk_diqu.sql内含数据库表 gk_diqu。 数据结构: mysql&gt; desc gk_diqu; +-------+----------------------+...5 rows in set (0.02 sec)

Global site tag (gtag.js) - Google Analytics