Comparison Functions

LIKE :

Simple pattern matching,Returns 1 or 0.

example 1 :
Select * FROM product WHERE name like '%e%;'
//All names having the character 'e' .
NOT LIKE :

Negation of simple pattern matching.Returns 1 or 0.

example 1 :
SELECT * FROM product WHERE name NOT LIKE '%e%;'
//All names not having the character 'e' .
IN :

Checks if the value of a field is within the set of values.

example 1 :
SELECT f_name, l_name, title FROM employee_data WHERE title = 'Web Designer' OR title = 'System Administrator' OR title = 'programmer';
OR
SELECT f_name, l_name, title FROM employee_data WHERE title IN ('Web Designer', 'System Administrator','programmer');

//Selects the record having the given three titles .
BEETWEEN :

expr BETWEEN min AND max

example 1 :
SELECT f_name, l_name, age FROM employee_data WHERE age BETWEEN 32 AND 40;
//The records having the age between given range(30 to 40).

SELECT f_name, l_name, salary FROM employee_data WHERE salary NOT BETWEEN 90000 AND 150000;
//The records having the salaray between given range.