我有这段代码:
BEGIN
DECLARE @NewLine CHAR(2)
SET @NewLine = CHAR(13)+CHAR(10)
END
当我在 phpmyadmin 中运行它时,我收到此错误:
#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 @NewLine CHAR(2) SET @NewLine = CHAR(13) + CHAR(10) END' at line 2
我在谷歌上用了大约 2 个小时,没有任何运气。据我所知,它应该是正确的语法。有人请帮忙