How to Export data from Oracle Database?
An Oracle database is a collection of data treated as a unit. The sole purpose of a database is to store and retrieve related data. This database contains data in the form of tables which are distributed in rows and columns. In our day-to-day life, we have to work on data and while working on databases we are required to import and export data. We can also import the data into the Oracle database but here in this article, we will see how to export data from the Oracle database.
Exporting data from Oracle Database
Here are a few steps through which we can export our table data into a text file which is in the form of comma-separated values.
Step 1: First Log in to your oracle database as you normally would.
Step 2: Click on option Utilities -> Data Load / Unload->Unload. You can Unload Data to XML and Text Files. Click on Unload to text option as shown in the below image.
Step 3: Select the schema in which your table is present which you want to export and click on next. Here my table is present in the system schema so I have selected the system schema.
Step 4: Select the table name from the list of the table to export and click on next. Here I have already created gfg_demo_table to export so I have selected gfg_demo_table as shown.
Step 5: Select the columns which you want to include in your file and click on next. You can also customize the column which you want to include or exclude in your file.
Step 6: Now select the checkbox to include column names in your file, check the customized details and click on Unload data option which is the final step of data export.
Step 7: Data is successfully exported into a text file that consists of five columns as shown below. The first row consists of column names and other rows followed by its data in CSV format.