SQL Server Command Order Mnemonic
There are people out there who struggle to remember the correct order in which to specify T-SQL commands in Microsoft SQL Server. While I’m not actually one of them, I did like this nice little mnemonic from guest columnist Andy Owl over at SQL Server mega-resource, SQL Server Central.
Andy’s article about the First 5 SQL Errors To Check For may not be anything new to experienced T-SQL heads but there are plenty of people out there who still make some of those mistakes due to lack of coffee, too many late nights trying to shave a few seconds off that query execution time or even just not paying attention.
My favourite part of his article though, is his mnemonic for remembering the correct order of commands in a T-SQL SELECT statement. He claims:
Of course, corresponding to:
- GROUP BY
- ORDER BY
Not bad at all, and something I might try and slip in the next time I’m speaking to someone who’s just learning T-SQL!