0
0
MySQLquery~5 mins

Comparison operators in MySQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the '=' operator do in SQL?
The '=' operator checks if two values are equal. It returns true if they are the same, false otherwise.
Click to reveal answer
beginner
What is the difference between '<>' and '!=' in MySQL?
Both '<>' and '!=' mean 'not equal to' in MySQL. They work the same way and can be used interchangeably.
Click to reveal answer
beginner
How does the '>' operator work in SQL?
The '>' operator checks if the value on the left is greater than the value on the right. It returns true if yes, false otherwise.
Click to reveal answer
beginner
What does the '<=' operator mean in SQL?
The '<=' operator means 'less than or equal to'. It returns true if the left value is smaller or equal to the right value.
Click to reveal answer
intermediate
Can you use comparison operators with text (strings) in MySQL?
Yes, you can compare strings using comparison operators like '=', '<>', '>', '<'. MySQL compares strings based on alphabetical order.
Click to reveal answer
Which operator checks if two values are NOT equal in MySQL?
A=
B<>
C>=
D<
What will the expression '5 > 3' return in SQL?
ATrue
BFalse
CError
DNull
Which operator means 'less than or equal to'?
A>=
B<=
C!=
D=
If you want to check if two values are exactly equal, which operator do you use?
A<>
B!=
C=
D>
Can you use '>' to compare two text strings in MySQL?
AYes, based on alphabetical order
BNo, only numbers
COnly dates
DOnly boolean values
Explain how the '=' and '<>' operators work in MySQL with examples.
Think about checking if two values are the same or different.
You got /3 concepts.
    Describe how comparison operators like '>', '<=', and '!=' can be used in SQL queries.
    Imagine filtering data based on conditions.
    You got /4 concepts.