这些查询返回正确的结果:
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')