Tuesday, June 7, 2011

Get full information about the tables on Oracle Server?

Easy:
Select t.table_name,t.owner, t.cluster_name,
        t.partitioned, t.iot_type, t.tablespace_name, t.last_analyzed, t.num_rows
       , t.temporary, t.table_type, t.table_type_owner, t.nested
       , decode(nvl(tablespace_name, 'x') || upper(partitioned) || nvl(iot_type, 'x') || to_char(pct_free), 'xNOx0', 'YES', 'NO') is_External
       , t.dropped
        , t.initial_extent
from sys.DBA_ALL_TABLES t

TABLE_NAME
ICOL$
OWNER
SYS
CLUSTER_NAME
C_OBJ#
PARTITIONED
NO
IOT_TYPE

TABLESPACE_NAME
SYSTEM
LAST_ANALYZED
6/3/2011 22:31
NUM_ROWS
26411
TEMPORARY
N
TABLE_TYPE

TABLE_TYPE_OWNER

NESTED
NO
IS_EXTERNAL
NO
DROPPED
NO
INITIAL_EXTENT
139264