1.Easy
Which keyword gives a column or table a temporary alternative name in a query?
- ANAME
- BAS
- CRENAME
- DALIAS
2.Easy
Which SQL statement changes values in rows that already exist?
- AINSERT
- BUPDATE
- CMODIFY
- DREPLACE COLUMN
3.Easy
What does a CROSS JOIN return?
- AThe rows of the first table only
- BEvery combination of rows from the two tables
- COnly the rows that match on a shared key column
- DOnly rows that do not match
4.Medium
Why does SELECT price * 2 AS double_price FROM t WHERE double_price > 10 fail in most databases?
- AAliases may not contain an underscore
- BArithmetic is not allowed in the SELECT list
- CWHERE is evaluated before the SELECT list, so the alias does not exist yet
- DWHERE can only compare text columns
5.Medium
Which ACID property means concurrent transactions do not see each other's unfinished changes?
- AIsolation
- BAtomicity
- CDurability
- DAvailability
6.Medium
What does ROLLBACK TO SAVEPOINT s1 do?
- AUndoes the whole transaction from the beginning
- BEnds the transaction and commits everything
- CUndoes the changes made after savepoint s1, keeping the transaction open
- DDeletes the savepoint and all tables changed since then
7.Hard
Why might a query with WHERE YEAR(order_date) = 2025 not use an index on order_date?
- AAn index on order_date is only used for ORDER BY clauses, never for WHERE
- BIndexes never work with dates
- CYEAR is not valid SQL
- DApplying a function to the column prevents a simple index range lookup
8.Hard
Boyce–Codd normal form (BCNF) requires that for every non-trivial functional dependency X → Y:
- AX contains NULL
- BY is a primary key
- CY is atomic
- DX is a superkey
Answer key
- 1. B · AS
- 2. B · UPDATE
- 3. B · Every combination of rows from the two tables
- 4. C · WHERE is evaluated before the SELECT list, so the alias does not exist yet
- 5. A · Isolation
- 6. C · Undoes the changes made after savepoint s1, keeping the transaction open
- 7. D · Applying a function to the column prevents a simple index range lookup
- 8. D · X is a superkey
Full step-by-step solutions: practise this topic on examproblems.com.