Which operator is used to test for equality in SQL?
A
== B
= C
=== D
!=
Analysis & Theory
The = operator tests for equality in SQL.
Which operator is used to combine conditions so that *both* must be true?
A
OR B
AND C
NOT D
IN
Analysis & Theory
AND combines conditions requiring all to be true.
Which operator is used to negate a condition?
A
!= B
NOT C
NOR D
EXCEPT
Analysis & Theory
NOT negates a condition in SQL.
Which operator is used to test if a value matches any value in a list?
A
BETWEEN B
IN C
LIKE D
ALL
Analysis & Theory
IN tests if a value is present in a list of values.
What does the BETWEEN operator do?
A
Matches patterns B
Selects records within a range C
Compares to a list D
Combines queries
Analysis & Theory
BETWEEN selects values within a specified range.
Which operator is used for pattern matching?
A
LIKE B
IN C
ALL D
ANY
Analysis & Theory
LIKE is used for simple pattern matching.
What is the result of the expression 5 <> 3 in SQL?
A
True B
False C
Error D
Null
Analysis & Theory
<> means 'not equal'; 5 is not equal to 3.
Which operator returns true if *any* subquery value meets the condition?
A
ALL B
ANY C
EXISTS D
BETWEEN
Analysis & Theory
ANY checks if at least one subquery value satisfies the condition.
Which of the following is an arithmetic operator?
A
AND B
OR C
+ D
LIKE
Analysis & Theory
+ is an arithmetic addition operator.
Which operator can be used to check for NULL values?
A
= NULL B
IS NULL C
== NULL D
NULL =
Analysis & Theory
IS NULL checks whether a value is NULL.