I am having the ISSUE in ROLLBACK
Have to delete the data from table using ROLLBACK in TRIGGER
This is my table
Table Name: Emp
ID int (IDENTITY 1,1) PK
NatID nvarchar(50)
LoginID nvarchar(50)
OrgID hierarchyid
Level computed
JobTitle nvarchar
DOB date
Mart_Status nchar(1)
hiredate date

Manoj BhoirPosted Jun 25, 2015, 1:17 AM
USE tempdb;
GO
CREATE TABLE ValueTable ([value] int;)
GO
DECLARE @TransactionName varchar(20) = 'Transaction1';
--The following statements start a named transaction,
--insert two rows, and then roll back
--the transaction named in the variable @TransactionName.
--Another statement outside of the named transaction inserts two rows.
--The query returns the results of the previous statements.
BEGIN TRAN @TransactionName
INSERT INTO ValueTable VALUES(1), (2);
ROLLBACK TRAN @TransactionName;
INSERT INTO ValueTable VALUES(3),(4);
SELECT [value] FROM ValueTable;
DROP TABLE ValueTable;
--Results
--value
-------------
--3
--4
Pankaj Kumar ChoudharyPosted Jun 24, 2015, 11:15 AM