In Oracle, if you use the q operator it will take the string given literally. For example:
select q'[You're awesome]' from dual;
Would work fine even though there’s a single quote in the middle of the string. This is nice because you don’t have to escape all the invalid characters in a string.
I want to know (out of curiosity) if there’s an equivalent to this in Java. I can’t seem to find anything about it on Google. It could be something like this:
String literal = q"[I'm a "literal" string]"; //maybe...
Thanks for the tips!
Unfortunately, no. The double-quote syntax is the only syntax for Java string literals.