Skip to content
Advertisement

Oracle SQL escape character (for a ‘&’)

While attempting to execute SQL insert statements using Oracle SQL Developer I keep generating an “Enter substitution value” prompt:

I’ve tried escaping the special character in the query using the ” above but I still can’t avoid the ampersand, ‘&’, causing a string substitution.

Advertisement

Answer

the & is the default value for DEFINE, which allows you to use substitution variables. I like to turn it off using

then you won’t have to worry about escaping or CHR(38).

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement