1.Easy
In PostgreSQL and MySQL, which clause returns only the first 10 rows of a result?
- ALIMIT 10
- BFIRST 10 ONLY
- CTOP ROWS 10
- DMAX 10
2.Easy
Statements such as CREATE, ALTER and DROP belong to which part of SQL?
- AData Definition Language (DDL)
- BData Manipulation Language (DML)
- CTransaction Control Language (TCL)
- DData Control Language (DCL)
3.Easy
What is an entity-relationship (ER) diagram used for?
- AMeasuring database performance
- BShowing how a query is executed
- CListing the users of a database
- DModelling entities, their attributes and relationships when designing a database
4.Medium
What does the "A" in ACID stand for?
- AAtomicity
- BAccuracy
- CAggregation
- DAvailability
5.Medium
What does SELECT name, CASE WHEN grade >= 5.5 THEN 'pass' ELSE 'fail' END FROM results return?
- AOnly the students who passed
- BThe number of students who passed and failed
- CEach name with the label 'pass' or 'fail' depending on the grade
- DAn error because CASE is not allowed in SELECT
6.Medium
Which statement removes all rows of a table, keeps its structure and cannot take a WHERE clause?
- ATRUNCATE TABLE
- BDROP TABLE
- CDELETE FROM with a WHERE clause
- DALTER TABLE
7.Hard
What does SELECT day, SUM(amount) OVER (ORDER BY day) FROM sales compute?
- AOne row per day with that day's total only
- BThe average amount per day
- CA running total of amount ordered by day
- DThe total of all amounts on every row
8.Hard
Why might a query with WHERE YEAR(order_date) = 2025 not use an index on order_date?
- AYEAR is not valid SQL
- BIndexes never work with dates
- CAn index on order_date is only used for ORDER BY clauses, never for WHERE
- DApplying a function to the column prevents a simple index range lookup
Answer key
- 1. A · LIMIT 10
- 2. A · Data Definition Language (DDL)
- 3. D · Modelling entities, their attributes and relationships when designing a database
- 4. A · Atomicity
- 5. C · Each name with the label 'pass' or 'fail' depending on the grade
- 6. A · TRUNCATE TABLE
- 7. C · A running total of amount ordered by day
- 8. D · Applying a function to the column prevents a simple index range lookup
Full step-by-step solutions: practise this topic on examproblems.com.