Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle list tables

SELECT * FROM USER_TABLES;		-- Tables from connected schema
SELECT * FROM ALL_TABLES;		-- Tables available to connected schema
	SELECT * FROM ALL_TABLES WHERE OWNER = 'SCHEMA_NAME';
	SELECT * FROM ALL_TABLES WHERE TABLES_NAME = 'TABLE_NAME';
SELECT * FROM DBA_TABLES;		-- All Tables
Comment

oracle list tablespaces

SELECT DISTINCT TABLESPACE_NAME FROM DBA_EXTENTS ORDER BY TABLESPACE_NAME;

SELECT TABLESPACE_NAME,
       sum(BYTES / 1024 / 1024) AS MB
FROM DBA_DATA_FILES GROUP BY TABLESPACE_NAME;
Comment

oracle all tables

-- NOTE: for Oracle ONLY

select * 
from all_tables;
Comment

oracle tablespace tables list

SELECT e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME, sum(e.bytes) / 1048576 AS Megs
FROM dba_extents e
WHERE
  e.OWNER = 'MY_USER' AND
  e.TABLESPACE_NAME = 'MY_TABLESPACE'
GROUP BY e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME
ORDER BY e.TABLESPACE_NAME, e.SEGMENT_NAME;
Comment

PREVIOUS NEXT
Code Example
Sql :: sqlite show columns in table 
Sql :: generate random data postgresql 
Sql :: how to check database size in mysql 
Sql :: SQL select past number of days 
Sql :: how to give access to database in postgresql server to another user 
Sql :: oracle alert log location 
Sql :: create a table with an id in mysql 
Sql :: yii2 mysql ping 
Sql :: snowflake alter column data type 
Sql :: copy from folders in sql server 
Sql :: nvl postgres 
Sql :: oracle get trigger ddl 
Sql :: Sql Server join multiple column values and separate with comma 
Sql :: t sql remove last character from string 
Sql :: apex select list ORA-20999 
Sql :: Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates. 
Sql :: mysql breakline on string 
Sql :: distincct sql 
Sql :: change month to name in sql server 
Sql :: insert current timestamp in postgresql 
Sql :: sql last week 
Sql :: sql server check table exists 
Sql :: mysql reset auto increment to 1 
Sql :: oracle trace session 
Sql :: group_concat order by 
Sql :: date to string sql 
Sql :: how to define a composite primary key in sql 
Sql :: oracle alter tablespace add datafile autoextend max size 
Sql :: cmd to rename a collumn name in sql 
Sql :: mysql to lowercase 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =