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!

INSERT INTO table(columns...) with table_tmp as ( select ...) select...

709255Jun 29 2009 — edited Jun 29 2009
Hi Guru,

Is below a valid SQL|PLSQL statement? or multiple statements and what it does?

insert into table(col1, col2, col3, col4)
with table_tmp as
(select ccol1, ccol2, ccol3, ccol4, ccol5, ccol6
from table1 t1, table2 t2
where t1.id=t2.id
and t2.start > sysdate()
)
select tcol1, tcol2, tcol3, tcol4
from table_tmp tt1, table3 t3
where tt1.id=tt3.id;

I checked the SQL quick reference and don't see anything similar to this... I wonder where can find a better syntax reference book.

Thanks in advance
kh
This post has been answered by BluShadow on Jun 29 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2009
Added on Jun 29 2009
4 comments
466 views