T-SQL or Transact Structured Query Language is a Microsoft developed SQL DBMS that is used for Microsoft SQL Server. It improves the standard SQL by adding further programming constructs, other options, and improved features specifically for managing data in SQL Server. T-SQL serves a purpose of allowing the programmers to communicate with the Database Server in order to generate and run queries, perform flow control and managing of data. Key Features of T-SQL:
Control-of-Flow Statements: Gives such tools as IF, WHILE, CASE, and
BEGIN … END to perform logic and to control the work of the code.
Procedural Programming: Allows creation of stored procedures, functions and triggers so as to form blocks of reusable codes.
Variables and Parameters: Provides an opportunity to create local variables and parameters used to save data temporarily during the execution of a query.
Advanced Functions: Has inherent capabilities of string manipulation, Date and time manipulation along with complex calculations.
Error Handling: Has TRY…CATCH that allows for courteous handling of errors while in T-SQL scripts.
Transaction Control: Recognizes and supports SQL calls such as BEGINTRANSACTION,
COMMIT, and ROLLBACK for creating, committing and rolling back database transactions for data integrity.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
T-SQL or Transact Structured Query Language is a Microsoft developed SQL DBMS that is used for Microsoft SQL Server. It improves the standard SQL by adding further programming constructs, other options, and improved features specifically for managing data in SQL Server. T-SQL serves a purpose of allowing the programmers to communicate with the Database Server in order to generate and run queries, perform flow control and managing of data.
Key Features of T-SQL:
Control-of-Flow Statements:
Gives such tools as
IF,WHILE,CASE, andBEGIN…ENDto perform logic and to control the work of the code.Procedural Programming:
Allows creation of stored procedures, functions and triggers so as to form blocks of reusable codes.
Variables and Parameters:
Provides an opportunity to create local variables and parameters used to save data temporarily during the execution of a query.
Advanced Functions:
Has inherent capabilities of string manipulation, Date and time manipulation along with complex calculations.
Error Handling:
Has TRY…CATCH that allows for courteous handling of errors while in T-SQL scripts.
Transaction Control:
Recognizes and supports SQL calls such as
BEGINTRANSACTION,COMMIT, andROLLBACKfor creating, committing and rolling back database transactions for data integrity.