Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Inserting single quote into the table

Re: Inserting single quote into the table

From: Chris Hamilton <ToneCzar_at_erols.com>
Date: Fri, 12 Mar 1999 17:24:22 GMT
Message-ID: <36eb4cdc.16633566@news.erols.com>


On Fri, 12 Mar 1999 16:11:19 GMT, sannarayan_at_my-dejanews.com wrote:

>Can anyone please tell me how to insert
>a single quote (" ' ")into an oracle table.

I think the easiest way is to use the chr() function, supplying it the ASCII value for a single quote, which is 39.

Try:

insert into mytable (mycolumn)
values ( chr(39) || 'Hello' || chr(39) );

select * from mytable;

MYCOLUMN



'Hello'

Chris



Chris Hamilton -- toneczar_at_erols.com
City of Washington Pipe Band
http://www.serve.com/cowpb/chamilton.html Received on Fri Mar 12 1999 - 11:24:22 CST

Original text of this message

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