SQL> select tablespace_name,sum(bytes/1024/1024) from dba_free_space group by tablespace_name;
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
USERDATA 99
SYSAUX 130.25
SYSTEM 82.6875
if we want it without decimals then use trunc
SQL> select tablespace_name,trunc(sum(bytes/1024/1024)) from dba_free_space group by tablespace_name;
TABLESPACE_NAME TRUNC(SUM(BYTES/1024/1024))
------------------------------ ---------------------------
USERDATA 99
SYSAUX 130
SYSTEM 82
TABLESPACE_NAME SUM(BYTES/1024/1024)
------------------------------ --------------------
USERDATA 99
SYSAUX 130.25
SYSTEM 82.6875
if we want it without decimals then use trunc
SQL> select tablespace_name,trunc(sum(bytes/1024/1024)) from dba_free_space group by tablespace_name;
TABLESPACE_NAME TRUNC(SUM(BYTES/1024/1024))
------------------------------ ---------------------------
USERDATA 99
SYSAUX 130
SYSTEM 82
No comments:
Post a Comment