--根据表名获取各个字段的类型、大小等信息
select a.name colname,b.name typename,a.length Length,a.isnullable is_null
from syscolumns a,systypes b
where a.xusertype=b.xusertype and a.id=object_id('表名')
--输出全连接的多表数据
select * from (
select * from a
union all
select * from b
) as k
注:必须添加as * ,不然会报错,相当于从视图中查找