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: Jason Selby <jselby_at_cams.co.uk>
Date: 1998/01/13
Message-ID: <CMS940927600@cams.demon.co.uk>#1/1

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

Original text of this message

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