Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: single quote
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