摘要:
if exists (select object_id(N'tempdb..#T'))begindrop table #Tendcreate Table #T(s nvarchar(4000),id int)declare @a nvarchar(4000)declare @idc intDECLARE @tablename nvarchar(256) DECLARE tnames_cursor CURSOR FORSELECT sortID FROM Alink group by sortIDOPEN tnames_cursor FETCH NEXT FROM tnames_ 阅读全文