存储过程插入大批量数据

1,代码如下:

declare i int;
    set i=20;
    while i<100 do
        insert into 表名(字段) values();;
        set i = i+1;
    end while;

2,如果无权限接触数据库可以使用servlet,进行for循环操作,不过这样效率比较低下

猜你喜欢

转载自www.cnblogs.com/superchong/p/10033748.html
今日推荐