Lecture

Comparison Operators

Comparison operators filter data by comparing values in a table.

You use them in the WHERE clause to return only rows that match certain conditions.


Quick Example

This query shows only students with grades 90 or above.

Show students with high grades
SELECT name, grade FROM students WHERE grade >= 90;

Learn More

Go through the slide deck on a right to see examples of comparison operators like =, !=, >, <, and BETWEEN, and how they're used in real queries.

Quiz
0 / 1

What does the following query return?

SELECT name FROM students WHERE grade != 100;

Students with grade exactly 100

Students with any grade except 100

Only students who failed

No students (it’s a wrong query)

Lecture

AI Tutor

Design

Upload

Notes

Favorites

Help