In oracle, I would like to achieve this
- I have one million records:
select count(bookid) from books where location='W01' and backuplocation='B01';
- I would like change any 150,000 bookid's 'location'='W01' to 'W02', where 'backuplocation'='B01'. [sql1]
- i commit the change.
- In case of problems, I would like to change those bookid's 'location'='W02' back to 'location'='W01 where 'backuplocation'='B01'. In another words, I would like to rollback [sql1].