What are the differences between T-SQL, SQL Server and SQL

SqlSql ServerTsql

Sql Problem Overview


I know enough about SQL to get my job done but reading different articles I see T-SQL, SQL Server and SQL. Are they all the same? What are the major differences between the three?

I know SQL is an ANSI standard. What about the other two?

Sql Solutions


Solution 1 - Sql

SQL is the basic ANSI standard for accessing data in a relational database. When you see "MSSQL" it is referring to Microsoft SQL Server, which is the entire database architecture and not a language. T-SQL is the proprietary form of SQL used by Microsoft SQL Server. It includes special functions like cast, convert, date(), etc. that are not part of the ANSI standard.

You will also see things like plSQL, which is Oracle's version of SQL, and there are others as well (mySQL has its own version, for example, and Microsoft Access uses Jet SQL.)

It is important to note the the ANSI standard for SQL has different releases (for example, 92 or 99, representing the year it was released.). Different database engines will advertise themselves as "mostly ANSI-92" compliant or "fully ANSI-99" compliant, etc, and any exceptions will usually be documented.

So although "SQL is SQL", every engine uses its own "flavor" of it, and you do have to do a little reading on the particular platform before you just dive in.

A further note - the SQL extensions, like T-SQL, are generally considered full-fledged programming languages, complete with looping, if/then, case statements, etc. SQL itself is limited to simply querying and updating data and is not considered a true programming language.

Wikipedia has a decent article for an overview here: http://en.wikipedia.org/wiki/SQL

Solution 2 - Sql

It depends in what context those terms are being used.

They might mean exactly the same or have a slightly different meaning in some situations.

Solution 3 - Sql

T-SQL is shorthand for Transact-SQL, which is Microsoft's SQL dialect, whereas MSSQL usually refers to the SQL Server engine itself.

Solution 4 - Sql

1.SQL is a programming language while T-SQL is an extension to SQL.

2.T-SQL is proprietary while SQL is an open format.

3.T-SQL contains procedural programming, local variable, and such while SQL does not.

4.T-SQL is Turing complete while SQL is not.

5.T-SQL has a different implementation of DELETE and UPDATE than SQL.

6.T-SQL is best if you use Microsoft SQL servers

Solution 5 - Sql

Unlike the Ottaman empire, Sybase still exists, and still uses Transact SQL. The Sybase (ASE) implementation is not exactly the same as the Microsoft one.

Sybase TSQL Guide

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDenaliHardtailView Question on Stackoverflow
Solution 1 - Sqluser158017View Answer on Stackoverflow
Solution 2 - SqlMichał PiaskowskiView Answer on Stackoverflow
Solution 3 - SqlBen MView Answer on Stackoverflow
Solution 4 - Sqluser2475604View Answer on Stackoverflow
Solution 5 - Sqldavid25272View Answer on Stackoverflow