975957 wrote:Sounds like a school assignment.
By mistake i have typed deptno=10 instead of 20 ....and by mistake i entered deptno=20 instead of 10.....Now i want correct it..how?
975957 wrote:It seems that you have already committed after firing above two commands, if so than probably you can restore only by flashback table option. Firstly you need to know the execution time of first update, this you may either guess or you may find from v$session.
IF WE USE UPDATE COMMAND LIKE
UPDATE EMP SET DEPTNO =20 WHERE DEPTNO=10;
This will update and deptno=10 in the place of 20...
Again we are updating deptno=10 like
UPDATE EMP SET DEPTNO=10 WHERE DEPTNO=20;
Now it will replaces 20.......