ITeye博客

oracle临时恢复备份

foolraty · 2010-06-14 19:17 · 数据库 · Markdown

备份 create table bilhdr_20100614 as select * from bilhdr where biltyp='SX' and to_char(crtdat,'yyyy-mm-dd hh24:mi:ss')>='2010-06-14 18:23' and to_char(crtdat,'yyyy-mm-dd hh24:mi:ss')<='2010-06-14 18:25' and bilid like 'JX%'

create table bilDTL_20100614 as select * from bildtl where biltyp='SX' and (dat,bilid) in ( select dat,bilid from bilhdr where biltyp='SX' and to_char(crtdat,'yyyy-mm-dd hh24:mi:ss')>='2010-06-14 18:23' and to_char(crtdat,'yyyy-mm-dd hh24:mi:ss')<='2010-06-14 18:25' and bilid like 'JX%') 删除 delete from bilhdr where biltyp='SX' and to_char(crtdat,'yyyy-mm-dd hh24:mi:ss')>='2010-06-14 18:23' and to_char(crtdat,'yyyy-mm-dd hh24:mi:ss')<='2010-06-14 18:25' and bilid like 'JX%'

delete from bildtl where biltyp='SX' and (dat,bilid) in ( select dat,bilid from bilhdr where biltyp='SX' and to_char(crtdat,'yyyy-mm-dd hh24:mi:ss')>='2010-06-14 18:23' and to_char(crtdat,'yyyy-mm-dd hh24:mi:ss')<='2010-06-14 18:25' and bilid like 'JX%')

恢复回去 insert into bilhdr select * from bilhdr_20100614

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。