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!

select from cursor in plain SQL?

776714Jun 2 2010 — edited Jun 2 2010
Is it possible to use a declared cursor in a plain SQL select expression? Similar to the (non-working) example below:
declare
  cursor c is select * from user_tables;
  cnt number;
begin
  select 1 into cnt from c;
  dbms_output.put_line('cnt: ' || cnt);
end;
/
Basically, is it possible to reference and use a cursor only using plain SQL?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2010
Added on Jun 2 2010
6 comments
21,307 views