Database - TCL

TCL (Transaction Control Language)


Tcl-is used to control set of actions called transactions like insert,update, delete .

BEGIN TRAN
DELETE EMPloyee WHERE empno = 4
IF @@ROWCOUNT =1
BEGIN
      COMMIT TRAN
      PRINT 'EMPLOYEE DELETED'
END
ELSE
BEGIN
      ROLLBACK TRAN
      PRINT 'ROLLED BACK'
END

we use savepoints in TCL to save a particular transactions.

Comments

Popular posts from this blog

How to set Java Object into JaxBElement ?

GitLab