0% found this document useful (0 votes)
66 views1 page

SQL Transaction Management Example

This SQL script selects all data from the emp table, then begins a transaction to delete records where the emp_salary is less than 100,000. It comments that committing the transaction would make the data changes permanent, but instead performs a rollback to erase all modifications made during the transaction.

Uploaded by

Manoj Naik
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views1 page

SQL Transaction Management Example

This SQL script selects all data from the emp table, then begins a transaction to delete records where the emp_salary is less than 100,000. It comments that committing the transaction would make the data changes permanent, but instead performs a rollback to erase all modifications made during the transaction.

Uploaded by

Manoj Naik
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

D:\BE\Second Year\DBMS\Eigth_Pracs.

sql 1
1 SELECT * FROM emp
2
3 BEGIN TRANSACTION
4 DELETE FROM emp
5 WHERE emp_salary < 100000
6
7 /* COMMIT make data changes perment */
8 COMMIT TRANSACTION
9
10 /* ROLLBACK TRANSACTION erases all data modifications made from the start of the
transaction or to a savepoint */
11 ROLLBACK TRANSACTION

You might also like