Oracle practice commonly used SQL TableA columnA columnB A 1 & 2 sss select * from A where columnA like '% 1 & 123456'; ------------------ prompt to enter A variable. What if I want to query sss Based on the clomnA value? Analysis: & is a variable character (special character) in oracle ). Therefore, you must set & to a non-special character for normal query. Solution: set define off www.2cto.com select * from A where columnA like '1 & 2'; set define off explanation: set define off disables the substitution variable function. The default "&" in SQL * Plus indicates the substitution variable, that is, as long as the symbol appears in the command, SQL * Plus requires you to enter an alternative value. This means that you cannot input a string containing this symbol into the database or assign it to a variable. For example, the string "SQL & Plus" system will understand it as a string with the "SQL" header, it prompts you to enter the value of the substitution variable Plus. If you enter ABC, the final string is converted to "SQLABC ". Set define off to disable this function. "&" is used as a common character. For example, the final character is "SQL & Plus" set define off the replace variable function set define on enable the replace variable function set define *. The default replace variable identifier is "*" (or set to other characters) author: ziyunlong1984