MySQL数据库和表的语法问题

标签 mysql mysql-error-1064

我的语法有什么问题?

我正在尝试一次性更新多个数据库:

update `db_name1`.`db_table` SET `cc_number_enc` = NULL
update `db_name2`.`db_table` SET `cc_number_enc` = NULL
update `db_name3`.`db_table` SET `cc_number_enc` = NULL

我在 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 'cc_number_enc = NULL' at line 1

更新

我只是通过复制和粘贴重写了相同的查询,现在得到以下结果:

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 'cc_number_enc = NULL' at line 1

问题,我在 phpmyadmin 中运行查询的数据库有关系吗?

最佳答案

尝试在查询后面加上分号。
发生这种情况的原因有多种。
引用文献http://www.inmotionhosting.com/support/website/database-troubleshooting/error-1064
MySQl Error #1064
MySQL Nested Queries with Joins

关于MySQL数据库和表的语法问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36084620/

相关文章:

MySql 错误 1064 - 使用 MySQL WorkBench 创建

mysql - 无法启动Mysql-server服务

sql - 如何将 "group by"与三列数据一起使用?

javascript - 从灯箱内的数据库中打开与 ID 相关的图库

php - 如何按受欢迎程度对文章进行排序?

php - mysql字符集从utf8_unicode_ci解码到shift jis

Mysql 无法创建/写入文件错误#13

mysql - 将 SQL 查询结果从 Microsoft Visual Studio 导出到文本文件

mysql - MySQL 中 "ORDER BY order DESC"附近的语法错误

mysql - mySQL NetBeans 通信链路故障