【发布时间】:2016-12-21 22:49:51
【问题描述】:
我正在尝试从 MySQL 中的特定表中获取列名列表。我在跑步:
SELECT column_name
FROM information_schema.columns
WHERE table_name = `test 2.2`
AND table_schema = test
数据库名为test,表名为test 2.2,其余语法看起来正确。但是我一直收到错误
错误代码:1054。“where 子句”中的未知列“test 2.2”
还有其他方法可以让我做我想做的事和/或如何解决这个错误?
【问题讨论】:
-
您将值包装在 ` 中。你应该使用'
标签: mysql sql select information-schema