Sunday, April 17, 2005

Export a table in mysql to a file in csv format example

select * into outfile '/tmp/zips.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
from zips;

1 comment:

Anonymous said...

alter table tablename engine=csv

this will also give you same thing.