SQL is a query language used to insert, delete and update data within a relational database. Its main objective is to allow the client to do the following:
Various businesses use some form of SQL server for their relational database environment because of its efficient and scalable approach.
T-SQL is an add-on to basic SQL. The added features in this language include:
Similar to SQL, T-SQL is also used by multiple companies. It is used mainly within Microsoft SQL Server.
SQL and T-SQL have some similarities with respect to their structure and functionality, but they differ in terms of execution, servers, and functioning.
Let’s take a closer look at these differences:
TOP
keywordTOP
in T-SQL is used to retrieve a certain number of records from the database.
LIMIT
keywordIn SQL, the LIMIT
keyword is used to fetch a limited number of rows.
SELECT TOP 3 Roll_no, Name, Course_idFROM Courses;
TRY CATCH
keywordThe TRY CATCH
keyword is introduced in T-SQL to support exception handling and deal with errors after each execution statement.
BEGIN TRY## codeEND TRYBEGIN CATCH## codeEND CATCH;
Free Resources