开发者

Why are SQL fieldnames sometimes spelled like `this`?

开发者_如何学Go

What's the difference between

SELECT * FROM `this`

and

SELECT * FROM this

?


The former is escaped, the latter isn't. Consider:

SELECT * FROM `FROM`

On systems where the the backtick is an escape, that would select from a table called FROM (whereas without the backticks, it's a syntax error). Some systems use square brackets instead, e.g., SELECT * FROM [FROM].

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜