Oracle
 sql >> Base de Dados >  >> RDS >> Oracle

Verificação de condição do Oracle


Configuração do Oracle :
CREATE TABLE your_table ( strname ) AS 
  SELECT '''canada'',''tower''' FROM DUAL UNION ALL
  SELECT '''south'',''africa''' FROM DUAL;

Consulta :
SELECT *
FROM   your_table
WHERE  strname LIKE '%''' || lower( 'canada' ) || '''%'

Saída :
STRNAME
----------------
'canada','tower'

Consulta :
SELECT *
FROM   your_table
WHERE  strname LIKE '%''' || lower( 'south' ) || '''%'
AND    strname LIKE '%''' || lower( 'africa' ) || '''%'

Saída :
STRNAME
----------------
'south','africa'