Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Where question
Hi Marion,
Mario Yepes wrote:
>
> Hi !!
>
> I have an idiot question, suppose that I have a table with these
> fields:
> empl_id, name, address, zipcode, salary
>
> And an index by empl_id, salary
>
> How I should use the where clause to "take or use" that index
>
> where empl_id = 'xxx'
> and salary > 10000;
>
> or
>
> where salary > 10000;
> and empl_id = 'xxx';
in my experience every RDBMS, even Oracle, is smart enough to see that both where clauses are equivalent. You can verify this by using the autotrace option of SQL*Plus.
Regards!
--
Uwe Schneider | Telefon +49 7251 / 82587 Karlsdorfer Str. 31 | Mail pi_at_richard-schneider.de DE-76646 Bruchsal | http://www.richard-schneider.de/uweLinux - OS al dente! Received on Wed Oct 13 1999 - 16:42:43 CDT