gpt4 book ai didi

MySQL - 为什么查询 'IN' 失败?

转载 作者:行者123 更新时间:2023-12-01 00:15:41 25 4
gpt4 key购买 nike

这些查询返回正确的结果:

SHOW FULL COLUMNS FROM `users`
SHOW FULL COLUMNS FROM `teachers`

但是这个会产生错误

SHOW FULL COLUMNS IN  ('users', 'teachers')

我试过单引号、双引号、反引号和无引号,但都失败了。我做错了什么?

错误是这样的:

#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 '('users', 'teachers')' at line 1

最佳答案

也许这给了你想要的东西?

SELECT *
FROM information_schema.columns
WHERE table_name IN ('users', 'teachers')

关于MySQL - 为什么查询 'IN' 失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3893889/

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