为什么整得这么复杂呢?可不可以: 1,create table xxxx_backup select * from xxxx where .... 2,truncate table xxxx; 3,insert into xxxx select * from xxxx_backup ?
同意 lynx(lynx)的,不值得为了一张表,去导库!!直接做个备份表,改好了,就行了
做备份表好,但 lynx(lynx)的方法好像会造成数据丢失的哦。
1, 如果不存在xxxx_backup create table xxxx_backup select * from xxxx where 需要归档的数据检索条件 如果存在xxxx_backup insert into xxxx_backup select * from xxxx where 需要归档的数据检索条件2,delete from table where 需要归档的数据检索条件;
2、可以用delete删除,但如果导出失败的话,不好判断
3、可以导入
1,create table xxxx_backup select * from xxxx where ....
2,truncate table xxxx;
3,insert into xxxx select * from xxxx_backup
?
如果存在xxxx_backup
insert into xxxx_backup select * from xxxx where 需要归档的数据检索条件2,delete from table where 需要归档的数据检索条件;