62,272
社区成员
发帖
与我相关
我的任务
分享;with tab as ( select name tabname,id tabid from sysobjects where xtype='U' )
,col as (select name colname, id tabid, length collength, xtype colxtype, xusertype colxusertype from syscolumns )
,tps as (select name typename, xtype, xusertype from master..systypes )
select tabname,colname,typename,collength from tab
join col on tab.tabid=col.tabid
join tps on col.colxtype=tps.xtype and col.colxusertype=tps.xusertype