欢迎投稿

今日深度:

数据表字段属性查询

数据表字段属性查询


---查询数据库所有表名
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'

www.htsjk.Com true http://www.htsjk.com/sybase/19740.html NewsArticle 数据表字段属性查询 ---查询数据库所有表名 select id,name from sysobjects where xtype='u' order by name ---查询表的所有字段属性 select * from syscolumns where id=object_id(N'FMS_PayApply') ---查询表字段名,类...
评论暂时关闭