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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Using to_number in a where clause

aengineer-JavaNetJun 22 2010 — edited Jun 23 2010
Consider a table T that has 2 columns, of type VARCHAR2. Consider the following tables values

Col1 Col2
----------------------
A        1
A        2
B        X
B        Y

will the below query always work:
select * from T where col1 = 'A' and to_number(col2) between 1 and 2

Would oracle apply the where clause criteria as defined in the SQL from left to right?

Thanks
Aspi Engineer

Edited by: aengineer on Jun 22, 2010 8:52 AM

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 21 2010
Added on Jun 22 2010
14 comments
35,628 views