当前位置: 代码迷 >> Sql Server >> 怎么知道表的每个列的数据类型
  详细解决方案

怎么知道表的每个列的数据类型

热度:88   发布时间:2016-04-24 09:29:53.0
如何知道表的每个列的数据类型

------解决思路----------------------
在左边的里面找到相应的表,点开就能看到列类型
------解决思路----------------------

select b.colname,
a.[name] 
from sys.types a 
inner join (select [name] as colName,
system_type_id 
from sys.columns 
where [object_id]= (select [object_id] 
from sys.tables 
where [name]= '表名')
) b 
on a.system_type_id = b.system_type_id
  相关解决方案