Professional Documents
Culture Documents
Les 02
Les 02
Objectives
Limit the rows retrieved by a query Sort the rows retrieved by a query
2-2
2-3
2-4
2-5
Character strings and date values are enclosed in single quotation marks.
Character values are case sensitive, and date values are format sensitive.
2-6
Comparison Conditions
Operator
= > >= < <= <>
Meaning
Equal to Greater than Greater than or equal to Less than Less than or equal to Not equal to
2-7
2-8
BETWEEN ...AND...
IN(set) LIKE IS NULL
2-9
Lower limit
Upper limit
2-10
2-11
2-12
Logical Conditions
Operator Meaning
AND
OR
NOT
2-13
2-14
2-15
2-16
Rules of Precedence
Order Evaluated 1 2 3 4 5 6 7 8
Operator Arithmetic operators Concatenation operator Comparison conditions IS [NOT] NULL, LIKE, [NOT] IN [NOT] BETWEEN NOT logical condition AND logical condition OR logical condition
2-17
Rules of Precedence
last_name, job_id, salary employees job_id = 'SA_REP' job_id = 'AD_PRES' salary > 15000;
2-18
Rules of Precedence
2-19
ORDER BY Clause
2-20
2-21
2-22
2-23
Summary
In this lesson, you should have learned how to:
2-24