开发者

Blank spaces in column names with MySQL

One of the column names in my database is two words long, including a blank space, i.e.: Area One. I am using SELECT 开发者_如何学编程and referring to the column names to pull the data I want. Now if I name the column _Area_One_, my SELECT works, but if I use _Area One_, it does not. It says Unknown column 'Area' in 'field list'

Ideas?


Use backticks.

SELECT * FROM `Area One`
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜