db2 +c “declare c1 cursor for select * from ZF_BWGG_HIS where substr(ZFMSGID,1,8)>‘20190515’”; db2 “load from c1 of cursor insert into ZF_BWGG_HIS_BAK nonrecoverable”; db2 commit;
DB2备份一年数据1)表:ZF_BWGG_HIS ZF_BWGG_HIS_BAK2)将ZF_BWGG_HIS表中1年的数据备份至ZF_BWGG_BAK表中db2 +c “declare c1 cursor for select * from ZF_BWGG_HIS where substr(ZFMSGID,1,8)>‘20190515’”;db2 “load from c1 of cursor insert into ZF_BWGG_HIS_BAK nonrecoverable”;db2