Search code examples
sqloraclequoting

Using escaping string with quotes in Oracle DB


I have a very simple question. Assume, I want to do select:

select '''Y''' asd, q'['Y']' asd from dual

Okay, it works. Then I switch it to

select '''N''' asd, q'['N']' asd from dual

And it fails with ORA-01756! So have I missed something in manuals about quoting with Q-letter? By the way I'm using Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

Thanks in advance!


Solution

  • The reason is that I was using v.9 of PL/SQL Developer. After moving to the v.10 the issue was gone.