Answers:
从mysql命令行使用SQL:
SELECT * from YOURTABLE
WHERE status=0 and id>20
INTO OUTFILE 'yourtable.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
或将mysqldump与--where =选项一起使用:
mysqldump -u youruser -p yourdbname yourtablename --where="status=0 and id>20">yourtable.sql
使用phpMyAdmin,您可以在GUI中执行查询,然后在结果集下单击“导出”。