MS SQL Server Concepts and Programming Question:

Download Job Interview Questions and Answers PDF

What Is a Transact-SQL Statement?

MS SQL Server Interview Question
MS SQL Server Interview Question

Answer:

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.


Download MS SQL Server Interview Questions And Answers PDF

Previous QuestionNext Question
What Is Transact-SQL Language?How To Start and End Transact-SQL Statements?