I have a task to create a stored procedure in Oracle DB. Given two different databases DB1 with student_lookup table and DB2 with student_master table . The SP needs to check if DB2.student_master's record exists in DB1.student_lookup table.
- If the record exists in DB1 then don't anything
- If the record doesn't exists in DB1 then add from DB2
- If the record is in DB1 but not DB2 then update that record and set partition_key column to 1.
Any help will be appreciated. I am completely new to Oracle DBA.