的空间我有如下表如何指定列名(在where子句中),其中有在MySQL
ID First Name Last Name
1 Ruby Rails
2 Loop Western
列有他们的空间,所以当我编写一个查询类似
$sql = "SELECT * FROM Persons where [Last Name] = 'Western' ";
它引发错误
Error, could not list tables MySQL Error: 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 '[Last Name] = 'Western'' at line 1
我如何得到这个工作?
这确实假定OP对模式有任何控制,但是......都一致。 +1 – 2010-11-19 17:01:47
这也适用于MS Access! – knocte 2014-02-24 21:02:54