Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

How to list tables in their dependency order (based on foreign keys)?

simon87Sep 4 2022 — edited Sep 4 2022

SELECT table_name
FROM all_Tables
WHERE OWNER = 'OWNER'
ORDER BY key_dependency;
For Example this tables:

image.pngGet list
image.pngI have this version
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE 12.1.0.2.0 Production
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production

Comments
Post Details
Added on Sep 4 2022
3 comments
1,170 views