Re: Selecting "special" characters from a table

From: Stowe <stowe_at_aol.com>
Date: 25 Feb 95 00:20:34 GMT
Message-ID: <3ilt4i$t2l_at_newsbf02.news.aol.com>


> 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. Received on Sat Feb 25 1995 - 01:20:34 CET

Original text of this message