SQL查询数据库中所有表、表字段名及数据类型

时间:2019-10-09 22:31:50   收藏:0   阅读:420
select b.name,a.colid,a.name
,(select systypes.name+(+cast(a.length/2as varchar(10))+) from systypes where a.xusertype=systypes.xusertype ) type
fromsyscolumns a
left outer join sysobjects b
on a.id=b.id
where b.xtype=Uand b.name = hq_hotel
order by b.name,a.colid

 

原文:https://www.cnblogs.com/ShaYeBlog/p/11644681.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!