SQL *Plus Ignore Ampersands
Jump to navigation
Jump to search
In SQL *Plus when an ampersand (&) is encountered, Oracle treats it as a value prompt.
For example, if you try to execute the following statement:
INSERT INTO DEPARTMENT (DEPARTMENT_NAME) VALUES ('Finance & Treasury');
SQL *Plus will return a prompt:
Enter value for Treasury:
To have SQL *Plus ignore the ampersand, use the following command prior to executing your query:
SET DEFINE OFF INSERT INTO DEPARTMENT (DEPARTMENT_NAME) VALUES ('Finance & Treasury');