Monday, November 16, 2015

Using the LIKE Condition


Use the LIKE condition to perform wildcard searches of valid search string values.
Search conditions can contain either literal characters or numbers:
    % denotes zero or many characters.
    _ denotes one character.

SELECT       first_name
FROM         employees

WHERE        first_name LIKE 'S%' ;

Using the IN Condition


Use the IN membership condition to test for values in a list:
SELECT employee_id, last_name, salary, manager_id
FROM   employees
WHERE  manager_id IN (100, 101, 201) ;


EMPLOYEE_ID
LAST_NAME
SALARY
MANAGER_ID
201
Edi
1000
100
202
Laki
2000
100
203
John
1500
101
204
Haan
3000
201