gpt4 book ai didi

MySQL数据库和表的语法问题

转载 作者:行者123 更新时间:2023-11-29 21:14:26 25 4
gpt4 key购买 nike

我的语法有什么问题?

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

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com