Relational Operators
There are six Relational Operators in SQL, and after introducing them, we'll see how they're used:
= Equal
!= Not Equal
< Less Than
> Greater Than
<= Less Than or Equal To
>= Greater Than or Equal To
The WHERE clause is used to specify that only certain rows of the table are displayed, based on the criteria described in that WHERE clause. It is most easily
understood by looking at a couple of examples.
SELECT stuname, stuid
FROM student
WHERE credits <
(SELECT AVG (credits)
FROM student)
gives you the names and ID'S of all studentswho have less than the AVERAGE number of
CREDITS of all students in the database.