DECLARE l_date DATE DEFAULT '2099-12-31'; [Err] 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 'DECLARE l_date DATE DEFAULT '2099-12-31'' at line 1 这里已经提示得很清楚了,是语法错误。 这些(定义变量)语法只有在存储过程或者函数当中才能使用。
[Err] 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 'DECLARE l_date DATE DEFAULT '2099-12-31'' at line 1
这里已经提示得很清楚了,是语法错误。
这些(定义变量)语法只有在存储过程或者函数当中才能使用。