Code Style Guide: SQL - nilakshdas/ThinkUp GitHub Wiki
This is the Code Style guide for SQL. See the main Code Style Guide page for other languages.
Correct:
SELECT * FROM table;
Incorrect:
select * from table;
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.
Correct:
SELECT n.name AS myname FROM names AS n;
Incorrect:
SELECT n.name myname FROM names n;