日期:2014-05-18  浏览次数:20568 次

SQL,information_schema.columns
select * from information_schema.columns


对象名 'information_schema.columns' 无效。


这个咋回事阿,来个人回答一下。



------解决方案--------------------
SQL code

select a.name as '表名',b.name as '字段名',b.isnullable,case when b.isnullable=1 then '允许Null' else '不允许Null' end as '是否允许Null'
from sysobjects as a inner join syscolumns as b 
on a.id=b.id and a.xtype='U' and a.name='TableName'