获取数据库中有默认值的所以字段
select a.name as TableName,b.name as FieldName,c.text as defaultValue from sys.sysobjects a inner join sys.syscolumns b on a.id=b.id inner join sys.syscomments c on b.cdefault=c.id where a.xtype='U' order by a.name,b.name select a.name as TableName,b.name as FieldName,c.text as defaultValue from sys.objects a inner join sys.columns b on a.object_id=b.object_id inner join sys.syscomments c on b.default_object_id=c.id order by defaultValue
平淡中储蓄成长
相关文章
发表评论
评论列表
- 这篇文章还没有收到评论,赶紧来抢沙发吧~