WHILE false
do
select 1;
END WHILE ;报错是哪里的问题:
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE false
do
select 1' at line 1
(0 ms taken)Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END WHILE' at line 1
(0 ms taken)
WHILE 1=1
do
select 1;
END WHILE ;
WHILE 1=1
do
begin
select 1
END WHILE
SQL 里面是这样写的。
WHILE condition
begin
select 1
end
mysql>
mysql> CREATE PROCEDURE simpleproc (OUT param1 INT)
-> BEGIN
-> WHILE false
-> do
-> select 1;
-> END WHILE ;
-> END;
-> //
Query OK, 0 rows affected (0.00 sec)mysql>
mysql> delimiter ;
mysql>