Therefore, when you use and replace, you simply use a single and faster way instead of entering the value again. Using && the value becomes locked for the variable name. Thus, the && variable would be different from the & variable. Thus, you would be requested once, and the value you entered would be bound to that variable name. Simply put, write your code as follows:
SELECT * FROM A_TABLE WHERE A_COLUMN = '&&aVariable1' UNION SELECT * FROM A_TABLE WHERE B_COLUMN ='&&aVariable2';
Then, if you want to use a different set of values, you will have to change the variable name to something like this: && aVariable3 'and' && aVariable4 'should be sufficient for another set.
source share