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 -> SQL Puzzle

SQL Puzzle

From: Peter Fullbright <pfullbright_at_hotmail.com>
Date: Thu, 17 Dec 1998 15:07:03 -0600
Message-ID: <36797276.BD8CEDD3@hotmail.com>


I am trying to understand the function of escape character while using a LIKE operator. Keep in mind, that '%' is the escape character in the following query. Please let mw know what the output is and how it works. The table 'databases' has one column 'db_names'.

SQL> select db_names from databases;

DB_NAMES



oracle
informix
sybase
ingress
db2

4 rows selected

SQL> SQL> select db_names from databases where db_names like '%e%';

   where % is an escape character.

Thanks. Received on Thu Dec 17 1998 - 15:07:03 CST

Original text of this message

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