数据表字段属性查询

---查询数据库全部表名
select id,name from sysobjects where xtype='u' order by name
---查询表的全部字段属性
select   *  from   syscolumns   where   id=object_id(N'FMS_PayApply')
---查询表字段名,类型,长度,默认值。是否同意为空
select column_name,data_type,CHARACTER_MAXIMUM_LENGTH,
COLUMN_DEFAULT ,IS_NULLABLE
 from information_schema.columns
where table_name = 'WF_WORKFLOW_STEP'

posted @ 2016-01-31 21:28  zfyouxi  阅读(355)  评论(0编辑  收藏  举报