Blogroll

Get a website with Godaddy


Logo designer Fiverr Frelancer

Tuesday, December 4, 2018

SQL - How to insert new record

Hi, before adding any new master record, why not add this begin transaction 
with this option, you can have option to commit or rollback to last change.

-----------------------------------------

'is to have option for rollback
begin transaction
insert into tblSalesman (code, name, deptcode, branchcode, runningCode, runningNo, deleted, insertedby)
values ('YY', 'Yeong', 'IT', 110,'SA/N/YK', 1, 0, 1);


' is to rollback last change
begin transaction
rollback

;is to confirm commit
begin transaction 
commit


*  once commit, no rollback is applicable


TQ

No comments:

Post a Comment

Amazon store

alidropship plugin

alidropship plugin
alidropship plugin

Total Pageviews

About