Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Funny result set in SQL query
I have an explanation of the results from 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!!!
>
That's because "_" (underscore) is a single character substitution just like "%" (percent) is a multiple character substitution. I believe you have to do something like this...
>SELECT TABLE_NAME FROM SYS.DBA_TABLES WHERE TABLE_NAME LIKE 'PRO' || '_' ||
'%';
If that doesn't work, try 2 underscores.
Sandy Received on Wed Jan 14 1998 - 00:00:00 CST