BEGIN TRAN BEGIN END DROP TABLE IF EXISTS tempdb..#t CREATE TABLE #t ( spid int, dbid int, ObjId int, IndId int, Type ), Resource ), Mode ), Status ), CREATEDT DATETIME DEFAULT(GETDATE()) ) BEGIN INSERT INTO #t ( spid,dbid,ObjId,IndId,Type,Resource,M