Re: Selecting "special" characters from a table

From: Kirk Bradley - Mainframe and Integration Technologies <kbradley_at_130.35.1.6>
Date: 9 Mar 1995 21:03:19 GMT
Message-ID: <3jnqen$paa_at_dcsun4.us.oracle.com>


 

And it is NOT SQL*Plus.. It's SQL!

Stowe (stowe_at_aol.com) wrote:
: > A fairly simple problem. I have a table with a varchar field ("Name"),
: > into which I wish to put the name "O'Leary". How do I escape the '
 character
: > so sqlplus doesn't interpret it as the end of the column ?
 

: Just use two ' characters to indicate a ' character, e.g.,
: insert into table values ('O''Leary');
 

: > Likewise, how do I do a select * from table where name = "O'Leary" ?
 

: There is nothing special you need to do for this.

--
Kirk Bradley
Oracle Corporation
Mainframe and Integration Technologies Group
Received on Thu Mar 09 1995 - 22:03:19 CET

Original text of this message