How to use variable in LIKE condition?
currently i am using the following query in TOAD,
DEFINE @name char(6);
SET @name = 'Ronie'+'%';
select * from employee where name like @name;
It is giving a "missing expression" I am using TOA开发者_如何学GoD for Oracle.
I'm hopeful this works
DEFINE NAME = "Ronie%" (CHAR);
select * from employee where name like '&&name';
Maybe problem is here: not 'Ronie'+'%'
but 'Ronie'||'%'
精彩评论