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!

SQL Query: How to pass list of values to the IN operator

622048Nov 16 2009 — edited Nov 16 2009
Hi,

I'm trying to pass a list of values to the WHERE <a> IN <list>
I dont want to use dynamic cursors (REF CURSOR). Is this possible using Oracle SQL?
Please let me know.

My program:

DECLARE
...
list_of_ids := '10, 20, 30';
...
SELECT MAX(sal) INTO max_sal FROM employee WHERE emp_id IN (list_of_ids);
...
END;
/

Thanks in Advance,
Niko
This post has been answered by JustinCave on Nov 16 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2009
Added on Nov 16 2009
2 comments
1,950 views