2011. 10. 20. 07:54
[MySQL] Exporting table as CSV file (테이블을 CSV 파일로)
2011. 10. 20. 07:54 in DB/MySQL
![](https://tistory1.daumcdn.net/tistory/216817/skin/images/bg_clear.gif)
출처: http://dev.mysql.com/doc/refman/5.6/en/select.html
MySQL 은 쿼리로 table export 를 지원하는구나. 아름답다.
MySQL 은 쿼리로 table export 를 지원하는구나. 아름답다.
SELECT a,b,a+b INTO OUTFILE '/tmp/result.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM test_table;