Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to restore Salary column in the HR Schema?

Mark1991Apr 11 2019 — edited Apr 11 2019

Hi everyone. Around 10 days ago, in my beautiful ignorance, I managed to destroy an entire Column of the HR.Schema. I managed to UPDATE SALARY SET = 10.... Not satisfied I even typed a "Commit;"...So every single Employee, obviously, has now a Salary value corresponding to 10. After days and days I ran into the FLASHBACK QUERY. Thought this would save me from my awful mistake but I later discovered that after 5 days max I'd get a "Snapshot too old" error like. So I've been told that I can simply reconstruct the EMPLOYEES TABLE by downloading the original script. Checking all around the web I found this link:
code.google.com/archive/p/adf-samples-demos/downloads

From there I downloaded the zip. I tried to manually take the only part that I needed to restore, which is the Salary column from the Employees Table. But I've ran into multiple errors. So I thought "I can truncate the table itself and then re-insert all of the values" but of course I ran into a huge issue since there is a Primary Key in this table. So, due to my ignorance and bad attempts at solving this issue, what do I do if I simply wanna restore all 107 Salaries without destroying the integrity of my HR Schema? Thanks in advance

This post has been answered by L. Fernigrini on Apr 11 2019
Jump to Answer
Comments
Post Details
Added on Apr 11 2019
25 comments
1,477 views