How to escape single quotes in strings
March 20th, 2006 By Eddie Awad
Just add one more single quote next to the one you want to escape. For example:
SQL> select 'eddie''s stuff' 2 from dual 3 / 'EDDIE''SSTUF ------------- eddie's stuff SQL> select 'the sopranos''' 2 from dual 3 / 'THESOPRANOS' ------------- the sopranos' SQL> select 'ain' || '''' || ' t that nice?' 2 from dual 3 / 'AIN'||''''||'TTH ----------------- ain' t that nice?

March 21st, 2006 at 3:33 am
You can also put:
chr( ) take chance to write any character
March 21st, 2006 at 11:15 am
The alternative quoting mechanism introduced with 10g should be mentioned as well.
e.g. (i hope this example gets formatted right):
A link to the documentation:
http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_sqltypes.htm#sthref378
BR,
Martin