In my last article, I roughly described how standard SQL differs from T-SQL and who should learn which. Now I’d like to focus on the syntax differences and illustrate these differences with examples. If you think T-SQL is an extension implementing all the features from standard SQL, you aren’t right. However, in SQL Server, you will find almost all the features of the SQL standard. In this article, you will find examples of some of the differences in syntax between standard SQL and Transact-SQL.
#1 Names of Database Objects
In relational database systems, we name tables, views, and columns, but sometimes we need to use the same name as a keyword or use special characters. In standard SQL, you can place this kind of name in quotation marks (""), but in T-SQL, you can also place it in brackets ([]). Look at these examples for the name of a table in T-SQL: