sqlserver查询用户表和对应的表结构
查询用户表
select * from dbo.sysobjects where xtype = 'U'
查询表结构:
www.2cto.com
select a.name as colName,a.length,c.name as type,
b.name as tableName from dbo.syscolumns as a
inner join dbo.sysobjects as b on b.id = a.id
inner join dbo.systypes as c on a.xtype = c.xtype
where b.xtype = 'U'