WorksheetsSQL Quiz: Logical and Comparison Operators
Total questions: 10
Worksheet time: 5mins
Which SQL operator is used to combine two conditions where both must be true?
OR
LIKE
AND
BETWEEN
Which operator returns records that match at least one condition?
AND
NOT
OR
BETWEEN
What does the LIKE operator do in SQL?
Compares numeric values
Searches for a specified pattern in a column
Updates a table record
Filters exact matches only
Which symbol is commonly used with LIKE to represent any number of characters?
#
_
*
%
Which SQL keyword is used to exclude a condition?
OR
NOT
LIKE
AND
Which statement correctly selects values between 10 and 50 inclusive?
WHERE value NOT BETWEEN 10 AND 50
WHERE value BETWEEN 10 AND 50
WHERE value > 10 OR < 50
WHERE value = 10 AND 50
What does NOT LIKE do in a SQL query?
Selects records with similar values
Updates a column value
Excludes records that match a pattern
Sorts data alphabetically
Which query selects values outside the range 100 to 500?
WHERE amount BETWEEN 100 AND 500
WHERE amount NOT BETWEEN 100 AND 500
WHERE amount = 100 OR 500
WHERE amount < 100 AND > 500
Which SQL command is used to modify existing records in a table?
INSERT
DELETE
SELECT
UPDATE
Which statement correctly updates a student's grade to 90 where the ID is 5?
UPDATE students SET grade = 90 WHERE id = 5;
UPDATE grade = 90 FROM students;
SET grade = 90 WHERE id = 5;
MODIFY students grade = 90;
