摘要:
declare @tbname varchar(50),@sql nvarchar(1000) --定义变量@tbname,@sql,@jdeclare tbroy cursor forselect name from sysobjects as awhere xtype= 'u'and SUBSTRING(name,0,3)='PM'order by name --定义游标,sysobjects为系统表,xtype= 'u'表示是用户表open tbroy --填充游标fetch next from tbroy into @tbname --提 阅读全文