Exp 11
Exp 11
Grant succeeded.
Grant succeeded.
Grant succeeded.
Revoke succeeded.
1 row created.
SQL>
SQL> INSERT INTO Client (ClientID, Name, Phone, Email, Address)
2 VALUES (4, 'Vikas Patel', '9123456789', '[email protected]', '567 Yellow
St, Kolkata');
1 row created.
SQL>
SQL> -- Commit the transaction (permanently save changes)
SQL> COMMIT;
Commit complete.
1 row created.
SQL>
SQL> -- Rollback the transaction (undo this insertion)
SQL> ROLLBACK;
Rollback complete.
SQL> INSERT INTO Client (ClientID, Name, Phone, Email, Address)
2 VALUES (5, 'Neha Joshi', '9871234560', '[email protected]', '301 Red St,
Chennai');
1 row created.
SQL>
SQL> -- Set a savepoint
SQL> SAVEPOINT BeforeUpdate;
Savepoint created.
SQL>
SQL> UPDATE Client SET Phone = '9998887776' WHERE ClientID = 5;
1 row updated.
SQL>
SQL> -- Rollback to the savepoint (undo the update but keep the insertion)
SQL> ROLLBACK TO BeforeUpdate;
Rollback complete.
SQL>
SQL> -- Commit the remaining changes
SQL> COMMIT;
Commit complete.