Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Funny result set in SQL query
In article <34bad3cb.806387_at_news.erols.com>, cjustice_at_erols.com says...
>
>Try the following query...
>
>SELECT TABLE_NAME FROM SYS.DBA_TABLES WHERE TABLE_NAME LIKE 'PRO_%;
>
>If you have tables like PRO_ACCOUNT and PROACCOUNT, it will return
>both tables!!!
The underscore character is a meta character meaning any 1 character will be included. To make this work you need to do
SELECT TABLE_NAME FROM SYS.DBA_TABLES
WHERE TABLE_NAME LIKE 'PRO\_% ESCAPE '\';
The escape bit negates the meta character.
Hope this helps Received on Tue Jan 13 1998 - 00:00:00 CST