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 migration tools从SQLSERVER到MYSQL的中文乱码问题如何解决啊?
- PostgreSQL怎么在查询时,得到时间对应周的周一日期。
- mysql设置权限问题
- 在linux 下,select * from表的时候出现乱码?
- My Sql的一个怪问题,数据库需要phpMyAdmin“激活”
- postgresql出现的莫名其妙的错误,急!
- 在VC++环境下如何设置MySQL???
- 关于SQL语句的问题?在线等待
- 数据表关联问题
- mysql在2008双机热备下 开机无法启动
- 如果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 ;