SQL Server Documentation

T-SQL (Transact-SQL)

T-SQL is the dialect of Microsoft SQL Server that is used for interacting with the database. It's a procedural extension of the SQL standard and provides a rich set of features for data manipulation, querying, and control.

Key Features

Example Code

                    
                        -- Simple SELECT statement
                        SELECT * FROM Customers;

                        -- Example of a stored procedure
                        CREATE PROCEDURE GetCustomerByID
                        (
                            @CustomerID INT
                        )
                        AS
                        BEGIN
                            SELECT * FROM Customers WHERE CustomerID = @CustomerID;
                        END;