Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: inserting a ' (apostrophe) in a table
Subject: Re: inserting a ' (apostrophe) in a table
From: nmcp[nospam]@s-and-a.com (Niall McPhillips)
Hi,
You can make it easy on yourself by using the chr() builtin function. Beats trying to remember whether you need 2,3 or 4 apostrophes.
The ascii code for an apostrophe is 39 (decimal)
So you just need to use chr(39) in the insert statement whenever you need an apostrophe.
For example, to insert O'Neill try
insert into my_table values ('O' ¦¦ chr(39) ¦¦ 'Neill');
Hope this Helps.
Niall.
In article <vF042.211$k25.361_at_pm01nn>, you say...
> Hi! I need to know how to insert a ' into a table field... i've tried
> using a double and it didn't work... any hints?
>
>
>
>
--
Note: remove [nospam] from e-mail address for correct address
Tel: +41 (22) 341.5001 Fax: +41 (22) 341.5004