Using backticks around field names

前端 未结 11 1324
-上瘾入骨i
-上瘾入骨i 2020-11-22 02:05

After reading a couple of answers and comments on some SQL questions here, and also hearing that a friend of mine works at a place which has a policy which bans them, I\'m w

11条回答
  •  悲&欢浪女
    2020-11-22 02:31

    There isn't anything wrong if you keep using MYSQL, except maybe the visual fuziness of the queries. But they do allow the use of reserved keywords or embedded spaces as table and column names. This is a no-no with most database engines and will prevent any migration at a later time.

    As for easy reading, many people use caps for SQL keywords, eg.

    SELECT some_fied, some_other_field FROM whatever WHERE id IS NULL;
    

提交回复
热议问题