How to escape special characters in oracle?

Member

by lottie , in category: MySQL , 6 months ago

How to escape special characters in oracle?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by domenico , 6 months ago

@lottie 

To escape special characters in Oracle SQL, you can use the backslash () character before the special character. For example, if you want to escape a single quote ('), you would write it as:

1
SELECT 'It's raining outside' FROM dual;


If you want to escape a backslash itself, you would write it as:

1
SELECT 'This is a backslash: \' FROM dual;


By using the backslash character, you can escape special characters in Oracle SQL queries.

Related Threads:

How to store special characters in oracle?
How to remove special characters from a string in postgresql?
How to correctly escape characters in command-line postgresql query?
How to store unicode characters in oracle?
How to remove specific initial characters from a column in oracle?
How to replace first three characters of a string in oracle?