Basic Oracle Concepts and Programming Question:

Download Job Interview Questions and Answers PDF

How To Export Data to a CSV File?

Oracle Database Interview Question
Oracle Database Interview Question

Answer:

If you want to export data from a table to a file in CSV format, you can use the following steps:

► Right-click the table name, EMPLOYEES, in the object tree view.
► Select Export.
► Select CSV. The Export Data window shows up.
► Click Format tab.
► Select Format as: CSV.
► Enter File as: empMyTeam.csv.
► Click Columns tab.
► Check columns: FIRST_NAME, LAST_NAME, MANAGER_ID
► Click Where tab.
► Enter Where clause as: MANAGER_ID=100.
► Click Apply.

Your CSV file, empMyTeam.csv, is ready. Open it, you will see:

"FIRST_NAME","LAST_NAME","MANAGER_ID"
"Gerald","Cambrault","100"
"Lex","De Haan","100"
"Alberto","Errazuriz","100"
"Adam","Fripp","100"
"Michael","Hartstein","100"
"Payam","Kaufling","100"
"Neena","Kochhar","100"
...

CSV files can be open by Microsoft Excel.

Download Oracle Database Interview Questions And Answers PDF

Previous QuestionNext Question
How Many File Formats Are Supported to Export Data?What Is Oracle SQL Developer?