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: How can i store and retrieve strings with ' (Single quote) ??

Re: How can i store and retrieve strings with ' (Single quote) ??

From: Jacques Raymond Kilchoer <jrkilch_at_costcare.com>
Date: 1997/12/03
Message-ID: <34861AA3.219899C5@costcare.com>#1/1

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

Original text of this message

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