📜  在 sql 代码示例中开始事务

📅  最后修改于: 2022-03-11 15:05:05.681000             🧑  作者: Mango

代码示例2
-- It is Transaction Control Language(TCL)
-- case1 (temporary)
BEGIN TRANSACTION
-- perform DML operation i.e. INSERT, UPDATE, DELETE
ROLLBACK -- goes to previous state 

-- case2 (permanent)
BEGIN TRANSACTION
-- perform DML operation i.e. INSERT, UPDATE, DELETE
COMMIT -- Transaction is executed and hence change is done permanently