& IN WHERE CLAUSE of oracle [closed]
I had SQL query running on SQL developer IDE:
SELECT IC.ID
FROM INSTITUTE_COURSE IC
WHERE IC.NAME = 'CIVIL & ARCHITECTURE CAD';
Due to &
in where clause, ide returns an error "Enter Substitution Variable".
If I remove &
in String, query runs fine.
My Question is how to run query with &/ampersand in where clause?
Execute the command SET DEFINE OFF
before executing your query.
In addition to Dave Costa's answer, here are the relevant parts of the manual:
Substitution Variables:
http://download.oracle.com/docs/cd/B28359_01/server.111/b31189/ch5.htm#CACIFHGB
The SET DEFINE OFF command:
http://download.oracle.com/docs/cd/B28359_01/server.111/b31189/ch8.htm#sthref929
精彩评论