Mysql 결과를 파일로 저장

select * from TABLE into outfile '파일경로' fields terminated by ',';

ex) select * from test into outfile '/home/my/test.txt' fields terminated by ',';

파일경로 = 파일이 저장될 경로
terminated by ',' = 콤마(,)로 결과를 구분

'Technology > Database' 카테고리의 다른 글

MySQL / 행을 열로  (0) 2009.10.29
MySQL / Index 사용방법  (0) 2009.10.22
MySQL / 명령어 정리  (0) 2009.10.22
MySQL / 대용량 파일을 손쉽게 Insert 하기. (load data)  (0) 2009.10.22
MySQL / Get column names  (0) 2009.10.21

+ Recent posts