Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个查询,我需要为类似于第二个条件的名称变量提供输入。当我有 LIKE 条件时,我该怎么做?
upper(name) LIKE upper('%name%') AND trunc(sysdate) - INTERVAL '&NumberDays' DAY ( 3 ) <= create_dt
Oracle(实际上是sqlplus)在遇到以符号为前缀的变量时会进行乱码替换,因此您可以简单地执行以下操作:
sqlplus
upper(name) LIKE upper('%&name%')