Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

begin transaction sql

-- 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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #transaction #sql
ADD COMMENT
Topic
Name
4+9 =