To dump data from mysql table to txt file:
mysqldump --no-create-info --extended-insert=FALSE --compact psydex_rss_twitter MESSAGES > /tmp/testinsert.sql
(--extended-insert makes every row it's own insert statement)
SELECT col1,col2,col3
INTO OUTFILE '/tmp/file.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM table_here
WHERE col1 > 857461
LOAD DATA LOCAL INFILE '/tmp/file.csv'
INTO TABLE table_here
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n';
No comments:
Post a Comment