One of the things that I’ve always thought was missing in SQL Server and the T-SQL language was a built-in view that showed reserved words, and even better, future reserved words.
It’s one thing to say that you can create a policy to avoid people using reserved words for table, column, or object names, but how exactly do you know that the name you’ve chosen is one of those?
We decided to tackle that with one of our free SDU Tools for database developers and DBAs.
We added four views to help with this. The first is ReservedWords:
Note that we also added the color that these are normally displayed in tools like SQL Server Management Studio.
Microsoft also publishes a list of words that are reserved for future use. So we also added FutureReservedWords:
A number of words are reserved within ODBC so we added a view for that called ODBCReservedWords:
And finally, you don’t want to accidentally use the name of a data type either so we added SystemDataTypeNames:
To make all of these easier to work with in a single place, we added a view that has all this information. It’s called SystemWords and you can see it in the main image above.
You can also see each of these in action here:
For more information on SDU Insiders where you get access to get our free tools, books, and more, please visit http://sdutools.sqldownunder.com.