How to update/insert the table if cursor returns 0 records?
Hello All,
Oracle DB Version: 11.2.0.1
we have a requirement where there is no record in the cursor then it should update/insert the table with that record(s). Please find below the scripts for the same,
Create table:
create table table_a(emp_id number,emp_name varchar2(50))
/
create table table_b(emp_id number,dept_id number, dept_name varchar2(50))
/
create table table_c(process_flg varchar2(3),description varchar2(1000),emp_id number,emp_name varchar2(50),dept_id number,dept_name varchar2(50))
/
Insertion scripts:
insert into table_a values (1,'ABC1')
/
insert into table_a values (2,'ABC2')
/
insert into table_a values (3,'ABC3')