Christoph's 2 Cents

A Backup for My Brain!

Oracle Developement

Quoth the Raven

There is a handy little function that was introduced in 10g. It helps with the pain of escaping single ticks in string literals:

SQL> select q'(quoth the raven 'Nevermore')' from dual;
Q'(QUOTHTHERAVEN'NEVERMORE'
---------------------------
quoth the raven 'Nevermore'

This comes in handy when doing dynamic SQL where you want to execute complicated queries in an execute immediate call.

For further documentation see the Oracle documentation.