Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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
2,336 views