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!

LIKE vs RTRIM

240948Nov 9 2006 — edited Nov 9 2006
One of our tables has a telephone number field that is a varchar2(15). Our queries use LIKE '1234567890%' to compare against it. Is it cheaper to say RTRIM(field) = '1234567890'? Of course that assumes that the rest of the field is whitespace if not null. Or what about a SUBSTR comparison?

Message was edited by:
dtseiler
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2006
Added on Nov 9 2006
2 comments
193 views