SQL Server – ANSI SQL and T-SQL, What? Why? How?

Hi Folks,

You might have knowledge about this but do you know it deeply enough? Well I will try to give some heads up.

As you know SQL was invented by E.F. Codd while he was working at the IBM research labs in San Jose in 1971.

About ANSI-SQL:                                                                                                                                                        

  • The American National Standards Institute (ANSI) published a standard for the SQL language in 1989; they set a universal standard to which database vendors could adhere.  Later, in 1992, ANSI released an update to the SQL standard, known as SQL-92.
  • The standards helped formalize many of the behaviors and syntax structures of SQL.
  • The ANSI standard covered lots of important details concerning the querying and manipulation of data.
  • The syntax was formalized for many commands; some of these are SELECT, INSERT, UPDATE, DELETE, CREATE, and DROP.

Since the standards didn’t address every facet of programming for a relational database, so to meet the needs of their own user communities, database vendors began to extend the SQL language with capabilities that enhanced the basic functionality of SQL.

The Transact-SQL language was introduced by Sybase to answer user requirements for programming extensions to SQL-extensions enabling conditional processing, error handling, declared variables, row processing, and numerous other functions.


Characteristics of T-SQL:

  • T-SQL is the proprietary form of SQL used by Microsoft SQL Server.
  • It also includes special functions like cast, convert, date (), etc. that are not part of the ANSI standard.
  • T-SQL expands on the SQL standard to include procedural programming, local variables, various support functions for string processing, date processing, mathematics, etc. and changes to the DELETE and UPDATE statements.
  • T-SQL is the native language of SQL Server. All applications that communicate with an instance of SQL Server do so by sending Transact-SQL statements to the server, regardless of the user interface of the application.

Hope you enjoyed reading this. Do comment so that I can improve in my next post.



Piyush Bajaj

Like us on FaceBook Follow us on Twitter | Join the fastest growing SQL Server group on FaceBook

Follow me on Twitter  |  Follow me on FaceBook


About Piyush Bajaj

I am very passionate about SQL Server. I also did certification on MCSA – SQL Server 2012, Querying and Administering; MCTS – SQL Server 2008, Database Development; and MCTS – SQL Server 2005, Implementation & Maintenance, which helped me to get more knowledge and interest on this field.Please feel free to drop me any question online or offline, I will try to give you the best possible answer from my side.Right now I am working as a SQL Server developer in TCS. I have an experience of just 2.6 years, well I can only say that “If you have an interest and passion, experience might become a very small thing”.

View all posts by Piyush Bajaj →

5 Comments on “SQL Server – ANSI SQL and T-SQL, What? Why? How?”

  1. Didn’t knew that TSQL was introduced by Sybase . Always thought that it was developed by Microsoft.

  2. Yes, an excerpt from wiki on how it happened.

    “..Sybase called the database server “Sybase SQL Server” and made a deal with Microsoft to share the source code for Microsoft to remarket on the OS/2 platform as “SQL Server”. Until version 4.9, Sybase and Microsoft SQL Server were virtually identical. Due to disagreements between the two companies over revenue sharing (or lack thereof), Sybase and Microsoft decided to split the code-lines and went their own way, although the shared heritage is very evident in the Transact-SQL (T-SQL) procedural language as well as the basic process architecture. The big difference is that Sybase has a Unix heritage, while Microsoft SQL Server was adapted and optimized only for the Microsoft Windows NT operating system (vendor lock-in). Sybase continues to offer versions for Windows, several varieties of Unix, and for Linux….”

Leave a Reply

Your email address will not be published.