TRANSACTIONS SQL
--TRANSACTIONS---
---Group of SQL Statements which succeed or fail as a whole.
--We can commit the data, rollback the data,set save points using transactions.
--Savepoints:-These are the identification marks to which the data can be rolled back later on.
---Types of Transactions:--
----1)Autocommit Transactions
---- 2)Explicit Transactions
-----3)Implicit Transactions.
----Autocommit Transactions:-
insert emp(eid,enm) values(100,'abc')
--Explicit Transactions--
begin transaction
insert dept values(267)
insert dept values(33)
insert sales values(3)
commit transaction
---IMPLICIT TRANSACTIONS:--
---In these type of transactions, we need not write Begin Transaction statement before the Commit transaction or rollback transaction statement
--For this, we have to write Set Implicit_Transactions on
set implicit_transactions off
insert sales(sno) values(2356)
insert dept(dno) values(776)
---Group of SQL Statements which succeed or fail as a whole.
--We can commit the data, rollback the data,set save points using transactions.
--Savepoints:-These are the identification marks to which the data can be rolled back later on.
---Types of Transactions:--
----1)Autocommit Transactions
---- 2)Explicit Transactions
-----3)Implicit Transactions.
----Autocommit Transactions:-
insert emp(eid,enm) values(100,'abc')
--Explicit Transactions--
begin transaction
insert dept values(267)
insert dept values(33)
insert sales values(3)
commit transaction
---IMPLICIT TRANSACTIONS:--
---In these type of transactions, we need not write Begin Transaction statement before the Commit transaction or rollback transaction statement
--For this, we have to write Set Implicit_Transactions on
set implicit_transactions off
insert sales(sno) values(2356)
insert dept(dno) values(776)
TRANSACTIONS SQL
Reviewed by Rupesh
on
19:39
Rating:
No comments: