SQL SERVER 2008 获取表字段的类型

SELECT * FROM (
select a.name  TABLENAME,b.name FIELDNAME,c.name FIELDTYPE,c.length FIELDLENGTH from 
sysobjects a,syscolumns b,systypes c where a.id=b.id
and a.name='SYS_EXCEL' and a.xtype='U'
and b.xtype=c.xtype) TAB WHERE  FIELDNAME='ImportFIELDNAME'
原文地址:https://www.cnblogs.com/Gold-fangjin/p/5974102.html