Here are some of the common Oracle SQL queries to retrieve metadata in Oracle databases, including table details, columns, constraints, indexes, and more.
These queries are especially useful when working with Oracle Fusion to find the underlying table metadata information.
Note : These are the sample queries, please modify accordingly as per your requirements.
1. SQL Query to list All Tables in a Schema
2. SQL Query to List All Columns in a Table
3. SQL Query to Search for Tables with Specific Column Names
4. SQL Query to View Primary Key Information
5. SQL Query to View Foreign Key Information
6. SQL Query to View All Indexes on a Table
7. SQL Query to View Constraints on a Table
8. SQL Query to Search for a Keyword in Table or Column Names
9. SQL Query to List All Views in a Schema
10. SQL Query to View Dependencies of a Table
11. SQL Query to Identify Data Types and Lengths
12. SQL Query to List All Synonyms in a Schema
13. SQL Query to Search Materialized Views
14. SQL Query to Find Columns with Date Data Type
Oracle Metadata Tables
ALL_TABLES
: Contains details about all tables accessible to the user.ALL_TAB_COLUMNS
: Stores metadata about all columns.ALL_CONSTRAINTS
: Contains information about constraints on tables.ALL_VIEWS
: Provides details on views.ALL_SYNONYMS
: Contains synonym information.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.