Skip to content
Advertisement

How do I spool to a CSV formatted file using SQLPLUS?

I want to extract some queries to a CSV output format. Unfortunately, I can’t use any fancy SQL client or any language to do it. I must use SQLPLUS.

How do I do it?

Advertisement

Answer

If you are using 12.2, you can simply say

set markup csv on
spool myfile.csv
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement