Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Insert single quote
In article <kG3L4.61705$q67.917595_at_newsread2.prod.itd.earthlink.net>,
"Marty Provost" <liquidgolf_at_earthlink.net> wrote:
> Stupid question...
>
> What's the syntax to insert a string that contains a single quote?
>
> Example:
>
> TABLENAME
> columnname varchar2(100)
>
> insert into tablename (columname)
> values ('help me insert this ' into this column');
>
> Thanks in advance,
> Marty
>
>
the best way in odbc, jdbc, any 3gl interface is to use BIND VARIABLES which not only avoid this issue (quotes and such) but *massively* increase the performance of your system....
if you must use constants (and trust me -- you do not want to really), you can:
insert into t values ( 'How''s this' );
2 quotes in a character string constant = 1 quote inserted.
-- Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries http://osi.oracle.com/~tkyte/index.html -- Opinions are mine and do not necessarily reflect those of Oracle Corp Sent via Deja.com http://www.deja.com/ Before you buy.Received on Wed Apr 19 2000 - 00:00:00 CDT
![]() |
![]() |