I am querying an Oracle database using SQL developer.
When searching a string that contains the ampersand in SQL, I currently have to run the command "set define off;" preceding the query in order for it to not be treated as a 'define' variable.
For example:
set define off;
select 'Dungeons&Dragons' from dual;
set define on;
Works as expected and the '&' is treated as a literal character. But I wonder if there was a way to do this by marking the string as a literal such as:
select l'Dungeons&Dragons' from dual;
Or something along those lines.