Test for 10049676

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

Create table #test (a int primary key, x int, y int);
GO

CREATE TABLE #test2
    (a INT NOT NULL REFERENCES t1(a));;
GO

SET XACT_ABORT ON
GO

Create Proc #Testproc as 


BEGIN
INSERT Into #test2 values (2)
UPDATE #test SET X = 1 
    
END
GO
 
 
 INSERT INTO #Test values (1,3,3)
 GO
 
 
 BEGIN Try  
  SET XACT_ABORT ON
  EXEC #TestProc
 END TRY
 BEGIN CATCH
 END CATCH
 
 GO
   EXEC #TestProc
   GO
 SELECT * FROM #test

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results