Skip to content

Transactions

Transactions made permanent changes in a database. For Security purpose we are using Transactions.

COMMIT Transction :

It will do permanent changes in a database

The committed data can't be rollbacked.

ex :

1
2
3
4
5
Begin tran

delete from employee where id = 2

commit tran

Rollback Transaction :

We can recover deleted or updated data.

ex :

1
2
3
4
5
Begin tran

delete from employee where id = 1

rollback