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 query inside PL/SQL block.

DivasPSep 4 2012 — edited Sep 4 2012
Hello Experts,

I am just a beginner with PL/SQL.
If I write a select query from client like SQL dev and fire it against a database, it gives me result.
Eg: select * from employee;

Now when I use the same Query inside a PL/SQL block suppose:
Declare
begin
select * from employee;
end;
/
This gives error on execution, mentioning that an INTO is expected etc...
I have doubts here:
1. Can't I use a plain select inside a PL/SQL block (if so why?)

I know this is kind of very basic question, I tried searching this on the forum but could not find the thread, please redirect me to the link if this is already answered.
This post has been answered by Venkadesh Raja on Sep 4 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 2 2012
Added on Sep 4 2012
6 comments
6,954 views