Oracle
 sql >> Base de données >  >> RDS >> Oracle

Vérification des conditions Oracle

Configuration d'Oracle :

CREATE TABLE your_table ( strname ) AS 
  SELECT '''canada'',''tower''' FROM DUAL UNION ALL
  SELECT '''south'',''africa''' FROM DUAL;

Requête :

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

Sortie :

STRNAME
----------------
'canada','tower'

Requête :

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

Sortie :

STRNAME
----------------
'south','africa'