| What is SAVEPOINT in transaction control in SQL
There are certain conditions where we need to rollback some condition but not to all transaction. Then we can do this by using the SavePoint below example will helps you to under stand this
SavePoint Example
SQL< SAVEPOINT A
SQL< INSERT INTO Table_name VALUES (1,'ValuesA');
1 row inserted.
SQL< SAVEPOINT B
SQL< INSERT INTO Table_name VALUES (2,'valuesB');
1 row inserted.
SQL< ROLLBACK TO B;
Rollback complete.
SQL< SELECT * FROM Table_name;
ID column2
-------- -----------
1 valuesA | | |