Skip to content

Instantly share code, notes, and snippets.

@2803media
Created February 27, 2014 14:57
Show Gist options
  • Select an option

  • Save 2803media/9251674 to your computer and use it in GitHub Desktop.

Select an option

Save 2803media/9251674 to your computer and use it in GitHub Desktop.
Export csv
SELECT order_id,product_name,qty
FROM orders
INTO OUTFILE '/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment