首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

为什么mysql总提示异常

2012-04-06 
为什么mysql总提示错误?create procedure pro11()begindeclare i intrepeatinsert into t1(filed) values

为什么mysql总提示错误?
create procedure pro11()
begin
declare i int;
repeat
insert into t1(filed) values(i);
set i=i+1;
until i>=5
end repeat;
end;


为什么总提示语法错误呢?
用的是innodb引擎,workbench5.2 mysql:5.5.17

顺便提问一下:如何不用存储过程直接执行循环语句呢?

[解决办法]
一定要先执行delimiter //

热点排行