|
Home >> FAQs/Tutorials >> SQL Server FAQ
SQL Server FAQ - What Is a Transact-SQL Statement
By: FYIcenter.com
(Continued from previous topic...)
What Is a Transact-SQL Statement?
A Transact-SQL statement is a basic execution unit of the Transact-SQL language.
Here are some examples of Transact-SQL statements:
- "CREATE TABLE ...;" - A data definition language statement that defines a table.
- "INSERT INTO ...;" - A data manipulation language statement that inserts data into a table.
- "SELECT * FROM ...;" - A query statement that returns data from a table.
- "DROP TABLE ...;" - A data definition language statement that deletes a table.
- "DECLARE @name data_type;" - A declaration statement that defines a local variable.
- "SET @name = expression;" - An assignment statement that assigns a value to a local variable.
- "BEGIN TRANSACTION;" - A transaction management statement that marks the beginning of a transaction.
- "ROLLBACK TRANSACTION;" - A transaction management statement that rolls back all changes of a transaction.
(Continued on next topic...)
- What Is SQL Language?
- What Is Transact-SQL Language?
- What Is a Transact-SQL Statement?
- How To Start and End Transact-SQL Statements?
- How To Enter Comments in Transact-SQL Statements?
- What Is a Transact-SQL Statement Batch?
- What Happens to a Statement Batch If There Is a Compilation Error?
- How To Use GO Command in "sqlcmd"?
- How To Create User Messages with PRINT Statements?
- How Many Categories of Data Types Used by SQL Server?
- What Are Exact Numeric Data Types?
- What Are Approximate Numeric Data Types?
- What Are Date and Time Data Types?
- What Are Character String Data Types?
- What Are Unicode Character String Data Types?
- What Are Binary String Data Types?
- What Are the Differences between CHAR and NCHAR?
- What Are the Differences between CHAR and VARCHAR?
- What Are the Differences between DECIMAL and FLOAT?
|