1SELECT * FROM USER_TABLES; -- Tables from connected schema
2SELECT * FROM ALL_TABLES; -- Tables available to connected schema
3 SELECT * FROM ALL_TABLES WHERE OWNER = 'SCHEMA_NAME';
4 SELECT * FROM ALL_TABLES WHERE TABLES_NAME = 'TABLE_NAME';
5SELECT * FROM DBA_TABLES; -- All Tables
1SELECT DISTINCT TABLESPACE_NAME FROM DBA_EXTENTS ORDER BY TABLESPACE_NAME;
2
3SELECT TABLESPACE_NAME,
4 sum(BYTES / 1024 / 1024) AS MB
5FROM DBA_DATA_FILES GROUP BY TABLESPACE_NAME;
1SELECT e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME, sum(e.bytes) / 1048576 AS Megs
2FROM dba_extents e
3WHERE
4 e.OWNER = 'MY_USER' AND
5 e.TABLESPACE_NAME = 'MY_TABLESPACE'
6GROUP BY e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME
7ORDER BY e.TABLESPACE_NAME, e.SEGMENT_NAME;
1CREATE TABLESPACE
2TBS_NOME_TABLESPACE
3DATAFILE 'NOME_DATAFILE.dbf' SIZE 40M ONLINE;
1CREATE TABLE TB_NOME_TABELA
2(
3CODIGO NUMBER(38)
4)TABLESPACE TBS_NOME_TABLESPACE;