【问题标题】:How to fix SQL error 1064?如何修复 SQL 错误 1064?
【发布时间】:2016-10-07 00:11:58
【问题描述】:

我有个问题,编辑后导入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

我该怎么办?

【问题讨论】:

    标签: mysql sql syntax-error mysql-error-1064


    【解决方案1】:

    这样做:

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

    【讨论】:

    • 但在我看来另一个错误....它的 #1050 。创建表wp_cf_form_entries (id int(11) UNSIGNED NOT NULL, form_id varchar(18) NOT NULL DEFAULT '', user_id int(11) NOT NULL, datestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, @ 987654327@ varchar(20) NOT NULL DEFAULT 'active' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 MySQL 说:文档 #1050 - 表 'wp_cf_form_entries' 已经存在
    • 它说,你已经创建了那个表名,你不能再创建了。
    猜你喜欢
    • 2015-06-08
    • 2014-06-24
    • 2014-07-12
    • 2014-12-11
    • 1970-01-01
    • 2015-10-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多