What does the command set escape on and set escape OFF does in SQL. I happen to see this in a code but could not understand what is actually happening. Someone help me to fish out this.
Printable View
What does the command set escape on and set escape OFF does in SQL. I happen to see this in a code but could not understand what is actually happening. Someone help me to fish out this.
Sometimes you may need to use a special character such as & or _ in a query that is used by SQL*Plus. You can define an escape character. You may then use it in queries before a special character. It is often useful in automated scripting. To escape the quote character use multiple quotes
[B]set escape \
select 'It''s mine\; I like it' from dual;[/B]
You may also turn escape on and off.
[B]set escape off[/B]