If you only want to create a temp table then you can do either:-- Table Variable : lasts only for the scope of the current batch and level (so procs you call can't access this)DECLARE @tblVariable TABLE ( [Id] INT IDENTITY (1,1) PRIMARY KEY , [someColumn] NVARCHAR(255) )-- Temp Table (local to batch but in this level and child levels (so can be referenced from a stored proc)CREATE TABLE #tempTable ( [ID] INT IDENTITY (1,1) , [someColumn] NVARCHAR(255) )
There is lots of info online for both table variables and temp tables.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION