Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Funny result set in SQL query

Re: Funny result set in SQL query

From: Sandy Thrasher <sandra.thrasher_at_MCI2000.com>
Date: 1998/01/14
Message-ID: <YyTu.1989$412.443315@news.internetMCI.com>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US