Introduction to T-SQL Statements
T-SQL (Transact-SQL) is an extension of SQL that is used to interact with Microsoft SQL Server. It allows you to execute stored procedures, functions, and other database objects.
This section provides an overview of the most common T-SQL statements:
- SELECT - Retrieves data from one or more tables.
- INSERT - Adds new data to a table.
- UPDATE - Modifies existing data in a table.
- DELETE - Removes data from a table.
- CREATE TABLE - Creates a new table in the database.
Common T-SQL Statements
Example: SELECT Statement
SELECT * FROM Customers;
Example: INSERT Statement
INSERT INTO Customers (CustomerID, CustomerName, City)
VALUES (1, 'John Doe', 'New York');