SQLserver局部数据备份
3371 点击·0 回帖
![]() | ![]() | |
![]() | --delete from zd_bg_zh_copy where rq between to_date('2011-11-1', 'yyyy-mm-dd') and to_date('2011-12-31', 'yyyy-mm-dd') 1. insert into zd_bg_zh_copy select * from zd_bg_zh where rq between to_date('2011-11-1', 'yyyy-mm-dd') and to_date('2011-12-31', 'yyyy-mm-dd')--将需要备份的数据添加到另一个表中,结构要一样才行 2. select * into zd_bg_zh_copy from zd_bg_zh where rq between to_date('2011-11-1', 'yyyy-mm-dd') and to_date('2011-12-31', 'yyyy-mm-dd')--如果没有事先建好结构一样的表,会自动创建一个这样的表 | |
![]() | ![]() |