Home > Database > Mysql Tutorial > MySQL 按条件导出某部分数据

MySQL 按条件导出某部分数据

WBOY
Release: 2016-06-07 14:55:04
Original
2226 people have browsed it

想导出某个表中的某些数据,怎么办? mysqldump MySQL mysqldump -u root -p --no-create-db=TRUE --add-drop-table=FALSE --where="user=128560" 数据库名 表名 --skip-lock-tables data.sql#其中 --where 用来指定查询的条件 SELECT order_id,product_name,

想导出某个表中的某些数据,怎么办?
mysqldump MySQL
mysqldump -u root -p --no-create-db=TRUE --add-drop-table=FALSE --where="user=128560" 数据库名 表名 --skip-lock-tables > data.sql
#其中 --where 用来指定查询的条件
Copy after login
SELECT order_id,product_name,qty FROM orders INTO OUTFILE '/data/data.txt'
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template