查询虚拟表的所有字段和类型

--查询虚拟表的所有字段和类型
Select a.name as TableName,C.name AS TYPE from syscolumns a,sysobjects b,systypes c
where a.id = b.id
and b.type = 'U'
and a.xtype=c.xtype
and b.name='##testitem_w';
--查询虚拟表的所有字段
select name from tempdb.dbo.syscolumns where id=object_id(N'tempdb.dbo.##t')

posted @ 2017-04-28 22:52  码着码着就习惯了  阅读(189)  评论(0)    收藏  举报