Answers

Question and Answer:

  Home  Basic SQL Server

⟩ Explain Comment on Transactions?

- Using transactions we can group all SQL commands into a single unit.

- The transaction begins with some task and finishes only when all tasks within it are over.

- The transaction gets over successfully only when all commands in it are successfully over. Even if one command fails, the whole transaction fails.

- The BEGIN TRANSACTION, ROLLBACK TRANSACTION, and COMMIT TRANSACTION statements are used to work with transactions.

- A group of tasks starts with the begin statement.

- In case of any problem, the rollback command is executed to abort the transaction.

- If all the tasks run successfully, all commands are executed through commit statement.

 159 views

More Questions for you: