获得表信息 字段名等
Select O.Name as TableName,C.Name as ColumnName,C.Colid,T.Name as Type,C.Length, case c.isnullable when 1 then 'Null'else 'No Null'end as IS_NULLABLE from syscolumns c join sysobjects o on c.id=o.id and o.Xtype='U'and O.Name<>'dtproperties' join systypes t on c.XuserType=T.XuserType Order By O.Name,C.colid