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: single quote

Re: single quote

From: Tom Mettling <mettling_at_volpe.dot.gov>
Date: 1997/10/16
Message-ID: <344628CC.A93D44C1@volpe.dot.gov>#1/1

To insert a single quote, use two quotes. For the example you gave, it would be :

insert into COMPANY values ( 'SAN''ANGLE', ...)

Tom Mettling
WT Chen & Company, Inc.
mettling_at_volpe.dot.gov

Ong Chin Hui wrote:

> In some of my oracle tables' columns with char(N) type, the value may
> contain single quote.
>
> Eg.
>
> Company
> ==========
> SAN'ANGLE
>
> This would cause an error in the sql statement formed.
>
> Eg.
>
> insert into COMPANY values ( 'SAN'ANGLE', ...)
>
> It would be too tedious to check for this and add another single quote
>
> :
>
> insert into COMPANY values ( 'SAN''ANGLE', ...)
>
> Any solutions ?
> Can we use double quote instead ?
>
Received on Thu Oct 16 1997 - 00:00:00 CDT

Original text of this message

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