print ''select top 5 ['+a.name+'],* from ['+b.name+']''' 
from syscolumns a join sysobjects b on a.id=b.id 
where b.xtype='U' and a.status>=0 
--所查列的字段类型 
and a.xusertype in(175,239,231,167,56,60,108,106
open tb 
fetch next from tb into @s 
while @@fetch_status=0 
begin 
exec(@s
fetch next from tb into @s 
end 
close tb 
deallocate tb 

相关文章:

  • 2021-09-22
  • 2021-09-08
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2021-07-02
  • 2021-12-12
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案