Skip to content

Instantly share code, notes, and snippets.

@jczaplew
Created November 24, 2014 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jczaplew/5ae5978f6536fa54c389 to your computer and use it in GitHub Desktop.
Save jczaplew/5ae5978f6536fa54c389 to your computer and use it in GitHub Desktop.
Postgres query to CSV with headers
Copy (SELECT * FROM table LIMIT 1) To '/Users/me/Desktop/test.csv' DELIMITER ',' CSV HEADER;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment