You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unruthless edited this page Sep 13, 2010
·
5 revisions
This is the Code Style guide for SQL. See the main Code Style Guide page for other languages.
SQL statements should have SQL keywords in ALLCAPS.
Correct: SELECT * FROM table;
Incorrect: select * from table;
Never use backticks.
If you find that backticks are needed, that indicates that there is a design problem somewhere. Rather than use backticks, try to fix the design problem.
When specifying an alias for a column or table name, always use the AS keyword.