我有一个名为ant的表,其中包含以下内容:
现在,我想查看列phone_info
的内容,该列的ID例如为onexT1。我尝试使用:
SELECT phone_info WHERE id="onexT1" FROM ants;
但返回错误:
ERROR 1064 (42000): 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 'WHERE id="onexT1" FROM ants' at line 1
我该怎么做?谢谢:)
答案 0 :(得分:0)
使用单引号:
SELECT phone_info WHERE id = 'onexT1' FROM ants;