如何修复sql错误1064?

rqqzpn5f  于 2021-06-25  发布在  Mysql
关注(0)|答案(1)|浏览(419)

我有一个问题,当我在编辑后导入sql文件时,它会抛出以下错误:

ErrorStatic analysis:2 errors were found during analysis.Unexpected
character. (near "" at position 0)Unexpected beginning of statement. 
(near "" at position 0)SQL query: SET SQL_MODE =
"NO_AUTO_VALUE_ON_ZERO"

mysql说:


# 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 ' SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"' at line 1

我该怎么办?

q5iwbnjs

q5iwbnjs1#

这样做:

SET @SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
select @SQL_MODE;

相关问题