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, otherwise false.Click to reveal answer
beginner
What is the difference between
<> and != in PostgreSQL?Both
<> and != mean "not equal to" in PostgreSQL. They work the same way and return true if values are different.Click to reveal answer
beginner
How does the
< operator work in SQL?The
< operator checks if the value on the left is less than the value on the right. It returns true if yes, otherwise false.Click to reveal answer
beginner
What does the
>= operator check?The
>= operator checks if the left value is greater than or equal to the right value. It returns true if either condition is met.Click to reveal answer
intermediate
Can you use comparison operators with text values in PostgreSQL?
Yes, you can use comparison operators like
=, <, > with text. They compare strings based on alphabetical order.Click to reveal answer
Which operator checks if two values are NOT equal in PostgreSQL?
✗ Incorrect
The operator
<> means NOT equal in PostgreSQL.What does the
<= operator mean?✗ Incorrect
The
<= operator means less than or equal to.If you want to check if a value is greater than another, which operator do you use?
✗ Incorrect
The
> operator checks if the left value is greater than the right.Which operator would return true if two values are exactly the same?
✗ Incorrect
The
= operator checks for equality.Can you use
< to compare text values in PostgreSQL?✗ Incorrect
Text values can be compared alphabetically using
< and other comparison operators.Explain how the standard comparison operators work in PostgreSQL and give examples.
Think about how you compare numbers or words in real life.
You got /3 concepts.
Describe the difference between equality and inequality operators in SQL.
Equality means same, inequality means different.
You got /3 concepts.