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 rewrite a query using an or condition?

user533016Dec 20 2006 — edited Dec 20 2006
my query has a condition in the where caluse which has a OR part. because of the OR part the query cost increases.

is ther any way to rewrite the OR part apart from using an UNION operator.

select * from table1 a,table2 b where
a.field1 = 'CONSTANT'
and
a.field2= b.field2
and (a.field3 = 'input value' or a.field4 = 'input value')
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 17 2007
Added on Dec 20 2006
5 comments
477 views