Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试编写一个 sql 查询以从“状态”列中选择多个状态......我怎么会得到 #1054 - 'where 子句'中的未知列 'Alaska' 当它是一个值而不是一个列时?
SELECT * FROM Sheet1 WHERE State IN (`Alaska`, `Arizona`)
谢谢
史蒂夫
您使用了错误的引号;对于数据,您需要单引号 - 反引号用于列名和表名:
SELECT * FROM `Sheet1` WHERE `State` IN ('Alaska', 'Arizona')