1.Easy
Which operator is used for simple text pattern matching in a WHERE clause?
- AMATCH
- BSIMILAR
- CLIKE
- DCONTAINS
2.Easy
Which statement adds a new column to an existing table?
- AINSERT COLUMN
- BUPDATE TABLE
- CALTER TABLE
- DCREATE COLUMN
3.Easy
Which keyword sorts the result of a query?
- AORDER BY
- BARRANGE
- CGROUP BY
- DSORT
4.Medium
Why does SELECT price * 2 AS double_price FROM t WHERE double_price > 10 fail in most databases?
- AArithmetic is not allowed in the SELECT list
- BAliases may not contain an underscore
- CWHERE can only compare text columns
- DWHERE is evaluated before the SELECT list, so the alias does not exist yet
5.Medium
What does SELECT SUM(amount) FROM orders return when the WHERE clause matches no rows?
- AAn empty string
- BNULL
- C0
- DAn error
6.Medium
Third normal form (3NF) removes:
- AAtomic values
- BRedundant indexes on columns that are not part of a key
- CComposite keys
- DTransitive dependencies between non-key attributes
7.Hard
What does a FULL OUTER JOIN return?
- AThe Cartesian product, pairing each row of one table with every row of the other
- BAll rows from both tables, matched where possible and NULL-filled otherwise
- COnly unmatched rows
- DOnly matching rows
8.Hard
Why is NATURAL JOIN considered risky in production queries?
- AIt is not supported by any database
- BIt joins on every column with the same name, so a new column can silently change the result
- CIt ignores primary and foreign keys and keeps only NULL rows
- DIt always returns a Cartesian product
Answer key
- 1. C · LIKE
- 2. C · ALTER TABLE
- 3. A · ORDER BY
- 4. D · WHERE is evaluated before the SELECT list, so the alias does not exist yet
- 5. B · NULL
- 6. D · Transitive dependencies between non-key attributes
- 7. B · All rows from both tables, matched where possible and NULL-filled otherwise
- 8. B · It joins on every column with the same name, so a new column can silently change the result
Full step-by-step solutions: practise this topic on examproblems.com.