DELIMITER //
drop procedure if exists a;create procedure a();
Begin
declare i1 int default 1;
select curtime();
while i1 < 1000 DO
select * into outfile 'c:\\tem1p.sql' from icp where pc_standard like "%" and version like "%" and status like "%";
select i1+1 into i1;
end while;
select curtime();
end
//
drop procedure if exists a;create procedure a();
Begin
declare i1 int default 1;
select curtime();
while i1 < 1000 DO
select * into outfile 'c:\\tem1p.sql' from icp where pc_standard like "%" and version like "%" and status like "%";
select i1+1 into i1;
end while;
select curtime();
end
//
解决方案 »
- 一对多查询
- mysql 语句有错误...求帮忙
- 生产环境新安装的mysql数据库,select很慢,为什么?
- SQL语句能不能在Select语句中查询第一条,第80条,第160条,....依次类推直至结束??
- 数据库建表的问题(像CSDN这样树型结构)
- 各位大虾看过来:如何提高FreeBSD下的PostgreSQL的效率?
- ~~~~mysql能否不连接数据库,访问数据库文件?~~~~~
- 各位达人 测试DB压力现在流行用什么。
- C连MYSQL数据库遇到的link问题(内详) 谢谢解答
- mysql在插入一条数据后怎么获得刚插入那条数据的id
- 如果sql执行出错...事务会自动回滚吗?
- The total number of locks exceeds the lock table size
set i1=i1+1;
这个改不改都行,也就是问题并不是这理。
改成如下即可DELIMITER //
drop procedure if exists a//
create procedure a()
Begin
declare i1 int default 1;
select curtime();
while i1 < 1000 DO
select * into outfile 'c:\\tem1p.sql' from icp where pc_standard like "%" and version like "%" and status like "%";
select i1+1 into i1;
end while;
select curtime();
end
//
DELIMITER ;
drop procedure if exists a; 改成 //create procedure a(); 去掉分号
Begin
declare i1 int default 1;
select curtime();
while i1 < 1000 DO
select * into outfile 'c:\\tem1p.sql' from icp where pc_standard like "%" and version like "%" and status like "%";
select i1+1 into i1;
end while;
select curtime();
end
//
Begin
declare i1 int default 1;
select curtime();
while i1 < 1000 DO
select * into outfile 'c:\\tem1p.sql' from icp where pc_standard like "%" and version like "%" and status like "%";
set i1=i1+1;
end while;
select curtime();
end
$$DELIMITER ;