Datasheet
30
Chapter 1
Introducing SQL
!=, <>, or ^= (Inequality)
You can use any one of these three operators to test for inequality. The test evaluates to
TRUE if the values on both sides of the operator do not match.
SELECT first_name || ‘ ‘ || last_name “Name”, commission_pct
FROM employees
WHERE commission_pct != .35;
Name COMMISSION_PCT
------------------------------------------ --------------
John Russell .4
Karen Partners .3
Alberto Errazuriz .3
Gerald Cambrault .3
… … … … … …
Jack Livingston .2
Kimberely Grant .15
Charles Johnson .1
32 rows selected.
< (Less Than)
The < operator evaluates to TRUE if the left side (expression or value) of the operator is less
than the right side of the operator.
SELECT first_name || ‘ ‘ || last_name “Name”, commission_pct
FROM employees
WHERE commission_pct < .15;
Name COMMISSION_PCT
------------------------------------------ --------------
Mattea Marvins .1
David Lee .1
Sundar Ande .1
Amit Banda .1
Sundita Kumar .1
Charles Johnson .1
6 rows selected.
95127c01.indd 30 2/18/09 6:37:09 AM