Difference between SQL and T-SQL
1. Structured Query language (SQL): A structured Query language is a computer language for a relational database system. Relational database system like MySQL oracle Sybase Informix uses SQL as standard database language for storing retrieving manipulating data and store in a relational database. Here are some SQL commands that are used for communication with databases like storing retrieving manipulating data.
- Data definition language used to create, drop, alter, and truncate in database.
- Data manipulation language used to insert, update and delete data in the database.
- Data control language used for Revoke and grant data.
- Transaction control language used for commit, and rollback data.
- Data Query language used for select data.
2. Transact structured Query language (T-SQL): TSQL stands for Transact structured Query language which is a Microsoft tool and extension of SQL language. TSQL is mainly used for writing an entire program of block function procedure that defines how things need to be complete and creating an application in which each application sends transact query over SQL server and there is no interaction with the database. It executes as a whole block with the extension of SQL language. There are different types of T-SQL functions are used in T-SQL :
- Scalar function
- Ranking function
- Aggregate function
- Rowset function
Difference between SQL and T-SQL :
|Sr. No.||Basis of Comparison||Structured Query language (SQL)||Transact Structure Query language (T-SQL)|
|1.||Stands for||It stands for Structured Query Language.||It stands for Transact Structure Query Language.|
|2.||Developed by||It is developed by IBM.||It is developed by Microsoft.|
|3.||Definition||The Structured Query language is used to look over data using queries.||Transact Structure Query language is used for creating applications and adding business logic.|
|4.||Basic||It is a non-procedural/declarative language||It is a procedural language.|
|5.||Feature||It is open-source.||It is proprietary standard owned by Microsoft.|
|6.||Embed||You can embed SQL into TSQL.||You cannot embed TSQL into SQL.|
|7.||Query Language||SQL is a query language that serves the purpose of data manipulation.||TSQL is a query language, but it is an extension of SQL that serves Microsoft SQL Server databases and software.|
|8.||Operations||In Structured Query language, we perform DML and DDL operations.||In Transact Structured Query, there is a block of codes that used to write function and procedure.|
|9.||Execute||It executes a single statement.||It executes as a whole block.|
|10.||Interaction with Server||In SQL, there is interaction with Database server.||In TSQL, there is no interaction with database server.|
|11.||Commands and func tions||The proper syntax followed for the commands like INSERT, SELECT, UPDATE, DELETE and CREATE.||Special functions are also part of TSQL like converted date() and some other functions which are not part of SQL.|
|12.||Usage||It is mainly used to manipulate data and analyze data using simple queries.||It is mainly used for creating an application logic.|
Please Login to comment...