5. Metadata Queries
Oracle Metadata Tables
Metadata Table
Description
Listing Tables in a Schema
-- Oracle
select table_name from all_tables
where owner = 'PRANAY'
-- PostgreSQL, MySQL, and SQL Server
select table_name from information_schema.tables
where table_schema = 'PRANAY'Listing a Table’s Columns
Listing Indexed Columns for a Table

Listing Constraints on a Table
Listing Foreign Keys Without Corresponding Indexes
Using SQL to Generate SQL
Describing the Data Dictionary Views in an Oracle Database
Last updated