Wednesday, July 15, 2015

Oracle Q-quote - example

A quick reminder for me how to use Oracle SQL Q-quote.



SQL> select q'['welkom',' yesterday ]'||object_name||q'[', when'']' stmt 
  from dba_objects where rownum <2;

STMT
----------------------------------------
'welkom',' yesterday I_COBJ#', when''

SQL> select q'#'',' yesterday #'||object_name||q'[', when'']' stmt 
  from dba_objects where rownum <2;

STMT
----------------------------------------
'',' yesterday I_COBJ#', when''
 

No comments:

Post a Comment