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!

simple SQL command

765048Mar 6 2011 — edited Mar 6 2011
Hi all,
I have a simple qn about the oracle commands.
I heard about rowtype and cursor... and i know it is going to be useful in my following need but i am not sure about the syntax.
so please advise me if u do know.

I have the following sql statement:

Select ID from tableA where age = 30;
This will return two set of ID
1
3

How can I do a for each value of ID (1 and 3), do the next SQL command I want...

Can I combine the 2 SQL commands into one with the cursor? If so, how to?
I am just not sure about the Syntax :(
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 3 2011
Added on Mar 6 2011
4 comments
137 views