Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can i store and retrieve strings with ' (Single quote) ??
Bharat Yarlagadda wrote:
> Is there an escape char. that i can use to escape a ' in strings while
> storing the data. If there is any other way one could store and retrieve
> a single quote (') in varchar2 data type columns.
>
Use two single quotes.
insert into table (name) values ('O''Brian') ;
-- ___ ___ (___)=============================================================(___) | | Jacques Raymond Kilchoer MIS:Applications Support | | | | Assistant DBA /^\ ^ (714) 729-4500 x3733 | | | | Cost Care, Inc. /\ _/ \/ \ fax 729-4651 | | | | Newport Beach /\ /\/ \// \ \_/\ | | | | CA 92660 / \ / / \ / \ Suisse/Schweizer | | |___| ____/____\____/_________\___ _\_______ Svizzero |___| (___)=============================================================(___)Received on Wed Dec 03 1997 - 00:00:00 CST
![]() |
![]() |