select round((1-a.used/b.num_total)*100,0) percent from
(SELECT COUNT (DISTINCT SUBSTR(rowid,1,15)) Used FROM 表名) a,
(select blocks num_total from dba_tables where table_name='表名' and wner='用户名') b;
SQL> alter table test_shrik enable row movement ;
SQL> alter table test_shrik shrink space ;
SQL> select t.table_name,BLOCKS,EMPTY_BLOCKS,NUM_ROWS
from user_tables t
where table_name = upper('test_shrik');