Answer the question
In order to leave comments, you need to log in
How to insert value from cte into oracle table?
I have a table in which I need to insert values from cte, I use this syntax:
with cte as(
select *
from a
)
insert into b select * from cte where rnk=1;
Answer the question
In order to leave comments, you need to log in
Probably something like this, the with construction should be immediately before the select
insert into b
with cte as (select * from a)
select *
from cte
where rnk=1;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question