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 :
|Basis of Comparison
|Structured Query language (SQL)
|Transact Structure Query language (T-SQL)
|It stands for Structured Query Language.
|It stands for Transact Structure Query Language.
|It is developed by IBM.
|It is developed by Microsoft.
|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.
|It is a non-procedural/declarative language
|It is a procedural language.
|It is open-source.
|It is proprietary standard owned by Microsoft.
|You can embed SQL into TSQL.
|You cannot embed TSQL into SQL.
|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.
|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.
|It executes a single statement.
|It executes as a whole block.
|Interaction with Server
|In SQL, there is interaction with Database server.
|In TSQL, there is no interaction with database server.
|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.
|It is mainly used to manipulate data and analyze data using simple queries.
|It is mainly used for creating an application logic.
Share your thoughts in the comments
Please Login to comment...