Is case relevant in SQL commands?

Soviero asked:

MySQL 5.5 on Ubuntu 12.04.1

I know that the databases, users, tables, etc. are case-sensitive (at least on Linux). But what about the commands themselves?

For example, compare:

SELECT *  FROM `PINs` WHERE `pin` > 1000

and:

select * from `PINs` where `pin` > 1000

I know both “work,” but are there any down-sides to using lower-case commands?

My answer:


MySQL commands are not case sensitive. However, many people capitalize them anyway to make them visually distinct from other parts of the query.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.