如何修复 SQL 错误 1064?
How to fix SQL error 1064?
我有一个问题,当我在编辑后导入 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
我该怎么办?
这样做:
SET @SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
select @SQL_MODE;
我有一个问题,当我在编辑后导入 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
我该怎么办?
这样做:
SET @SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
select @SQL_MODE;