Tuesday 10 May 2016

Query to Finding Columns and Tables

The all_tab_columns is a useful table that can be queried for such information.
For example:

SELECT  table_name, column_name
FROM   all_tab_columns
WHERE column_name like 'PO_HEADER%’;

           
TABLE_NAME                                              COLUMN_NAME
------------------------------ ------------------       ------------------------
PO_ACCRUAL_RECONCILE_TEMP        PO_HEADER_ID
PO_ACCRUAL_WRITE_OFFS                   PO_HEADER_ID
INVFV_MOVEMENT_STATISTICS            PO_HEADER_NUMBER
MTL_MOVEMENT_STATISTICS_V                 PO_HEADER_ID
FINANCIALS_PURGES_V                                 PO_HEADERS

You can also find all tables from,

select * from all_objects
where object_name like '%PO_HEADERS_ALL%'
and object_type = 'TABLE'

No comments:

Post a Comment