Mysqldump 根据 “where” 条件导出对应的SQL

Mysqldump 根据 “where” 条件导出对应的SQL

Mysqldump 工具也可以根据 where进行sql语句的导出

create table t1(id int,name char(20));

insert into t1 values(1,'asdf');
insert into t1 values(2,'asdf');
insert into t1 values(3,'zxcv');
insert into t1 values(4,'nmlk');
insert into t1 values(5,'mnlf');

mysqldump -uroot -p --where="id < 4" wyl t1 > /tmp/n.sql

你可能感兴趣的:(Mysql)