日期:2014-05-17 浏览次数:20589 次
--没现成的函数
select t.name from sysobjects o,syscolumns c,systypes t
where o.id=c.id and c.xtype=t.xtype
and o.name='tb' and c.name='ccc'
------解决方案--------------------
SELECT * FROM
INFORMATION_SCHEMA.[COLUMNS] c
WHERE c.TABLE_CATALOG='数据库名'
AND TABLE_NAME='表名'
AND COLUMN_NAME='列名'