Oracle
 sql >> Database >  >> RDS >> Oracle

Controllo delle condizioni Oracle

Impostazione Oracle :

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

Interroga :

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

Risultato :

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

Interroga :

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

Risultato :

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