3 ms·
Among the various languages I use, why is SQL the only one that favors ALL CAPS EVERYTHING? When writing ad hoc queries I ignore that convention just to be orne
by MetaWhirledPeas 5y ago
Among the various languages I use, why is SQL the only one that favors ALL CAPS EVERYTHING? When writing ad hoc queries I ignore that convention just to be ornery.
- kybishop 5y agoMy honest take is that it's rare to name your tables and columns with all caps, whereas there are various cases where people do so with camelCase and snake_case. In the end this makes spotting SQL-specific functions much clearer. I find it much easier to read SQL with this convention since my brain immediately knows when it's looking at context/project-specific data or a FUNCTION.
- Izkata 5y agoHTML used to be the same, it fell out of practice at some point. The same may happen to SQL under the right circumstances.
- kinjba11 5y agoYou're not alone. Myself and many coworkers don't feel the need to capitalize everything, preferring `select * from Table` to the shouting version `SELECT * FROM TABLE`. It ain't the 80s anymore, we can use lowercase.
- yen223 5y agoThis reminds me, case sensitivity of identifiers (table names, column names etc) in SQL is a whole mess that can fill another blog post.