Reputation: 87
with
ct2 (emp_name,emp_id) as (
select emp_name,emp_id
from "TEST_1"."PUBLIC"."TEST11"
)
insert into "TEST_1"."PUBLIC"."EMP1"
select emp_name,emp_id
from ct2;
Upvotes: 4
Views: 10569
Reputation: 2612
I guess you are looking for the correct syntax to achieve the above.
Try this:
insert into "TEST_1"."PUBLIC"."EMP1"
with ct2 (emp_name,emp_id) as (select emp_name,emp_id from "TEST_1"."PUBLIC"."TEST11")
select emp_name,emp_id from ct2;
Upvotes: 8