---查詢數據庫所有表名
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'