--表信息
Select a.id as ID, c.name as 表名, a.name as 列名 ,b.name as 类型, 
a.length as 长度, a.scale as Scale, a.isnullable as 允许空
 from syscolumns a, systypes b, sysObjects c 
 where a.xtype = b.xusertype and a.id = c.id  
and c.xtype='U' and c.status>0 
order by c.name,a.colorder