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)

解决方案 »

  1.   

    --try
    WHILE 1=1
    do
    select 1;
    END WHILE ;
      

  2.   

    这样测试下:
    WHILE 1=1 
    do 
    begin
    select 1 
    END WHILE  
    SQL 里面是这样写的。
    WHILE  condition 
    begin
    select 1 
    end
      

  3.   

    这是报的语法错误,建议去mysql板块询问
      

  4.   

    不是这一段中的问题,建议贴全你的代码。mysql> delimiter //
    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>