关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

超强 mssql 获得字段长度,字段备注,字段默认值,是否允许空

发布时间:2019-11-02 12:08:13

select 

o.name  tableName,

c.name  columnName,

t.name  columnType,

p.value  columnDescription,

c.length columnLength,

c.isnullable  isnull,

(select text from syscomments where id=c.cdefault) columnDefaultValue


from  

sysobjects o, 

syscolumns c,

sys.extended_properties p,

systypes t



where o.id=c.id

and p.major_id=c.id 

and p.minor_id=c.colid  

and c.xusertype=t.xusertype

and o.type='u'

and p.name='MS_Description'  

and o.name='netwingcrm_company'


运行结果

121212-300x134.jpg



/template/Home/Zkeys/PC/Static