There are several different ways to do this, I find the easiest is to create a view then use SQL Developer’s Database Export wizard.
Requirements:
Step 1: Create a view
https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-VIEW.html
Step 2: Use SQL Developer’s Database Export wizard to export the view to your desired file format
In SQLDeveloper, Tools → Database Export
- Select the correct DB connection
- Uncheck ‘Export DDL’
- Under ‘Export Data’ change Format to CSV or XLSX (or whatever file type is desired)
- Adjust file names and output dir as desired, click Next
- Uncheck all except ‘Views’, Next
- Ensure that you select the correct schema selected, if the schema is not the default schema for your user, click ‘more’ – select the correct schema and change type from ‘All Objects’ to ‘View’
- Click ‘Lookup’ and you will see the view you created in Step 1
- Select the View and hit the blue arrow to move the view into the lower box, then click next, review and Finish.. your export will now run with a status box for the task.