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!

How to use an index with "in clause"

755494May 18 2010 — edited May 18 2010
Hi All,

I am having a sql statement with " *in clause*".

for example:
select emp_id from emp where ename in ('vikas','krishna','john','scott');
When I check the explain plan it doesn't use the index here even if the statistics has been populated. It always goes for full table scan.
There is an index created for column ename.

Please tell me a technique as to how to make use of the index here.


Thanks & Regards,
Vikas Krishna
This post has been answered by Sudhakar_B on May 18 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2010
Added on May 18 2010
3 comments
7,917 views