SQL Server › T-SQL Fundamentals & Syntax
What is T-SQL, and how does it relate to standard SQL?
BeginnerAnswer
T-SQL, short for Transact-SQL, is Microsoft's extension of standard SQL used specifically in SQL Server, adding extra features beyond the standard SQL language, such as procedural programming constructs like variables, loops, and error handling, that let you write more powerful logic directly within the database.
DECLARE @Count INT;
SET @Count = 10;
IF @Count > 5
PRINT 'Count is greater than five';Real-world example A developer familiar with standard SQL learns T-SQL's additional procedural features, like variables and IF statements, to build more sophisticated logic directly within SQL Server stored procedures.