Here are some SQL programming guidelines and best practices we collected, keeping quality, performance and maintainability in mind. This list is not complete at this moment, and will be constantly updated.
Do not use SELECT * in your queries.
Always use table aliases when your SQL statement involves more than one source.
Use the more readable ANSI-Standard Join clauses instead of the old style joins.
Do not use column numbers in the ORDER BY clause.
Always use a column list in your INSERT statements.
Don’t ever use double quotes in your T-SQL code.
Do not prefix your stored procedure names with “sp_”.
Always use a SQL formatter to...