What is the function of the SQL 'WHERE' clause?
To group rows with the same value in a certain column
To filter records based on a specified condition
To limit the number of rows returned by a query
To order the results of a query
Which keyword is used in conjunction with the UPDATE statement to specify the conditions for updating rows?
WHEN
IF
CONDITION
WHERE
How would you select the top 5 highest-scoring games from a table named 'games' with a column called 'score'?
SELECT * FROM games ORDER BY score DESC LIMIT 5;
SELECT * FROM games WHERE score LIMIT 5;
SELECT TOP 5 * FROM games ORDER BY score DESC;
SELECT * FROM games ORDER BY score ASC LIMIT 5;
What SQL clause is used to filter rows in a result set based on specific conditions?
ORDER BY
FROM
SELECT
You want to find customers who have placed orders in the last month. You have two tables: 'Customers' and 'Orders'. Which subquery type would be most efficient to achieve this?
Any of the above would be equally efficient.
IN Subquery
Correlated Subquery
EXISTS Subquery
You are using a subquery to fetch a list of product IDs from an 'Orders' table. What is the main purpose of using the DISTINCT keyword within this subquery?
To retrieve only unique product IDs, eliminating duplicates.
To filter product IDs based on a specific condition.
To sort the product IDs in ascending order.
To limit the number of product IDs returned.
Which comparison operator means 'not equal to' in SQL?
<
=
<>
!=
What is the purpose of the 'LIMIT' clause in SQL?
It restricts the number of rows returned by the query.
It sorts the result set.
It filters rows based on a condition.
It groups rows with the same values.
What does the asterisk (*) symbol represent when used in a SELECT statement?
All columns
A comment indicator
A specific column name
A wildcard for searching data
Which SQL statement is used to add new rows into a table?
CREATE
INSERT
APPEND
ADD