按照数据行数查询
Select top 20 name, row_count(db_id(), id) from sysobjects order by row_count(db_id(),id) desc
按照分配的空间查询
Select top 20 name, reserved_pages(db_id(),id)/(1024.0 / (@@maxpagesize/1024.0) ) as "Allocated MB" from sysobjects order by reserved_pages(db_id(),id) desc
按照已使用空间查询
Select top 20 name, used_pages(db_id(),id)/(1024.0 / (@@maxpagesize/1024.0) ) as "Used MB" from sysobjects order by used_pages(db_id(),id) desc
查询sybase DB中占用空间最多的前20张表,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/dereklovecc/p/3844736.html