MySQL 按条件导出某部分数据
方式一:
1 | mysqldump -u root -p --no-create-db=TRUE --add-drop-table=FALSE --where= "user=128560" 数据库名 表名 --skip-lock-tables > data.sql |
2 | #其中 --where 用来指定查询的条件 |
方式二:
1 | SELECT order_id,product_name,qty FROM orders INTO OUTFILE '/data/data.txt' |