For teachers: free to print, copy and use in class. Every new worksheet has new values and its own answer key. A link to ExamProblems on your course page is appreciated.
Name: ____________________ Date: ____________
1.Easy
Which rows does WHERE price BETWEEN 10 AND 20 select?
ARows with price outside the range 10 to 20
BRows with price equal to 10 or 20 only
CRows with price above 10 and below 20, excluding 10 and 20
DRows with price from 10 to 20, including 10 and 20
2.Easy
Which SQL keyword removes duplicate rows from a result?
ASINGLE
BDISTINCT
CUNIQUE
DDIFFERENT
3.Easy
Which SQL statement retrieves data from a table?
AUPDATE
BCREATE
CINSERT
DSELECT
4.Medium
Why can a table have only one clustered index?
AThe SQL standard forbids more than one index on a table
BClustered indexes use too much memory
CThe rows can be stored physically in only one order
DClustered indexes can only be on the primary key
5.Medium
What does GRANT SELECT ON employees TO alice do?
ACopies the employees table to alice
BAllows alice to update and delete rows in the employees table
CMakes alice the owner of the database
DAllows the user alice to read the employees table
6.Medium
Third normal form (3NF) removes:
AComposite keys
BTransitive dependencies between non-key attributes
CAtomic values
DRedundant indexes on columns that are not part of a key
7.Hard
Why might a query with WHERE YEAR(order_date) = 2025 not use an index on order_date?
AApplying a function to the column prevents a simple index range lookup
BIndexes never work with dates
CYEAR is not valid SQL
DAn index on order_date is only used for ORDER BY clauses, never for WHERE
8.Hard
Which isolation level prevents dirty reads but still allows non-repeatable reads?
ARepeatable read
BRead committed
CSerializable
DRead uncommitted
Answer key
1. D · Rows with price from 10 to 20, including 10 and 20
2. B · DISTINCT
3. D · SELECT
4. C · The rows can be stored physically in only one order
5. D · Allows the user alice to read the employees table
6. B · Transitive dependencies between non-key attributes
7. A · Applying a function to the column prevents a simple index range lookup
8. B · Read committed
Full step-by-step solutions: practise this topic on examproblems.com.