Last active
November 15, 2018 09:59
-
-
Save cedricvidal/6eb3027ecab0ac62326f6dd5f74c55f5 to your computer and use it in GitHub Desktop.
Oracle SQL Developer - Export query to CSV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SPOOL "/tmp/export.csv" | |
select /*csv*/ * | |
from ( select /*+ FIRST_ROWS(n) */ | |
a.*, ROWNUM rnum | |
from ( SELECT c1, TIMESTAMP FROM mytable ORDER BY timestamp ) a | |
where ROWNUM <= | |
110 ) | |
where rnum >= 100; | |
/* Source https://stackoverflow.com/questions/4168398/how-to-export-query-result-to-csv-in-oracle-sql-developer */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment