| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: pattern matching query
On Wed, 03 Jun 1998 03:20:11 GMT, hyseo_at_samsung.co.kr wrote:
>I came from Sybase DB server experience.
>
>In Sybase I used select statement like belows.
> ==> select * from table where field like '[A-G]%'
> select * from table where field like 'A[ABGHI]%'
>
>In ORACLE SQL this expression is not recognized
>I have read the Oracle SQL manual but I have not found the solution
Oracle does allow the use of LIKE. The two pattern match characters are % and _ (percent and underscore). The % matches any number of characters, while the underscore matches any one character. That's it. The bracket syntax that you are using above is not supported. Here are some examples:
Jo% will match Jonathan, Jon, John, etc.
J_n will match Jon, Jan, Jen, etc.
hope this helps.
Jonathan Received on Wed Jun 03 1998 - 19:58:47 CDT
![]() |
![]() |