title: Export single table as csv file, syntax, SQL Developer
body: <p>I have looked at asktom, and thatjeffsmith, and on this site, but I still unclear. It is confusing b/c in other tools I have used it is very simple.</p>
  
  <p>I have a script that creates a small table from the data in my database (Oracle), I want to include syntax at the end of the script that exports the table I just created to my computer as a csv file. I would prefer to have this at the end of the script as opposed to a stored procedure or anything like that, b/c I have to frequently change where I save the csv files, and I'd just prefer to do it that way.  </p>
  
  <p>Something like:</p>
  
  <pre><code>SELECT /*csv*/ *
  FROM table_name
  EXPORT/OUTPUT/SAVE TO filepath.csv
  </code></pre>
  
  <p>I can do this with R, SPSS, STATA, SAS, in a line or two. Something like that is what I am looking for. I think I might need to specify format, quotes, header, or delimiter, but am not sure given the csv modifier in the SELECT statement. I feel like this is day 2 stuff but for some reason I cannot find a simple answer.  </p>
  
  <p>Thank you in advance.</p>