Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between T-SQL, SQL Server and SQL [duplicate]

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?

like image 677
DenaliHardtail Avatar asked Aug 19 '09 16:08

DenaliHardtail


People also ask

What is difference between T-SQL and SQL Server?

The obvious difference is in what they are designed for: SQL is a​ query language used for manipulating data stored in a database. T-SQL is also a query language, but it's an extension of SQL that is primarily used in Microsoft SQL Server databases and software.

What is SQL duplicate?

Duplicate records in SQL, also known as duplicate rows, are identical rows in an SQL table. This means, for a pair of duplicate records, the values in each column coincide. Usually, we will retrieve duplicate data, when we are joining tables.

How do I find duplicates between two tables in SQL?

Use the INNER JOIN function to find duplicates that exist in multiple tables. Sample syntax for an INNER JOIN function looks like this: SELECT column_name FROM table1 INNER JOIN table2 ON table1. column_name = table2.


2 Answers

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

like image 75
user158017 Avatar answered Sep 20 '22 23:09

user158017


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.

  • T-SQL - dialect of SQL language used in Microsoft Sql Server
  • MSSQL - Microsoft SQL Server software
  • SQL - Structured Query Language - depending on the context it might mean the sql language itself, sql database or sql database server of any kind.
like image 44
Michał Piaskowski Avatar answered Sep 23 '22 23:09

Michał Piaskowski