Difference Between SQL and T SQL
Query languages are used to access and manipulate databases. T-SQL and SQL are two popular query languages used today. Structured Query Language (SQL) is a computer language for databases. It is used to access and operate data in the Relational Database Management Systems (RDMS). T-SQL (Transact SQL) is an expansion of SQL developed by Microsoft. T-SQL is the query language used in Microsoft SQL Server.
SQL has the ability to insert data into a database, the data query for information, delete/ update data in a database and create / modify the database schema. SQL was developed by IBM in the early 1970s and was originally named SEQUEL (Structured English Query Language). The SQL language has several language elements called clauses, phrases, predicates, queries and statements. Of these, the most widely used are the queries. Queries are defined by the user in such a way that he / she describes the desired properties of the subset of data that he / she wants to get back from the database. Then the Database Management System executes the needed optimization as per the query and carries out the neeeded physical processes to yield the results of the query. SQL also allows data types such as bit strings, numbers, character strings and the date and time to be included in the columns of the database. American National Standard Institute (ANSI) and the International Organization for Standardization (ISO) have adopted SQL as a standard in 1986 and 1987 respectively. Although SQL is an ANSI standard, there are different versions of the SQL language. But to comply with the ANSI standards all the versions of SQL support commonly used commands like UPDATE, delete, insert, Select, Where etc in same manner.
T-SQL is an addition to SQL developed by Microsoft. Several features such as local variables are added in T-SQL. Procedural programming and support functions for string / processing of data are an added feature. These features make the language turing complete. Statement to T-SQL server server needs to be sent before any application communicating with SQL server. T-SQL grants flow control capabilities by using the following keywords: START and TERMINATE, break, CONTINUE, GOTO, if both sides, RETURN, and while WAITFOR. In addition, T-SQL allows the ‘FROM’ clause to be added to DELETE and UPDATE statements. This would allow the clause to insert part for DELETE and UPDATE statements. T-SQL also allows for insertion of several rows in one table using ‘BULK INSERT’ statement while reading an external file containing the data. Using the BULK INSERT enhances the performance instead of using separate INSERT statements for each row to be inserted.
What is the difference between SQL and T-SQL?
SQL is a language for computer database that has the ability to insert data into a database, query for information, update / delete data in a database and create / modify the database schema, while T-SQL extends SQL by adding several features. T-SQL was developed by Microsoft and is mostly used in Microsoft SQL Server. These features include local variables, procedural programming and support functions/ processing of information. T-SQL also allows for insertion of multiple rows into tables using the ‘BULK INSERT’ statement, which is not available in SQL. In addition, T-SQL allows the inclusion of ‘FROM’ clause to DELETE and UPDATE statements.