1)导出
select * from users into outfile ‘/tmp/users.txt‘;或 select * from users where sex=1 into outfile ‘/tmp/users.txt‘;
2)导入
load data from infile ‘/tmp/users.txt‘ into table users;
注意:此方法只能导出导入表数据,表结构需要另外处理。
时间: 2024-12-28 06:41:05
1)导出
select * from users into outfile ‘/tmp/users.txt‘;或 select * from users where sex=1 into outfile ‘/tmp/users.txt‘;
2)导入
load data from infile ‘/tmp/users.txt‘ into table users;
注意:此方法只能导出导入表数据,表结构需要另外处理。