SQL查询表占用空间大小.
create table tmp (name varchar(50),rows int,reserved varchar(50),
data varchar(50),index_size varchar(50),unused varchar(50))
insert into tmp (name,rows,reserved,
data,index_size,unused) exec sp_msforeachTable @Command1="sp_spaceused '?'"--sp_spaceused 't_vehicle'
select * from tmp order by name