1.Easy
Which statement removes rows from a table?
- ATRUNCATE COLUMN
- BDELETE
- CREMOVE
- DDROP
2.Easy
What does NULL represent in SQL?
- AAn empty string
- BA false Boolean
- CThe number zero in numeric columns
- DA missing or unknown value
3.Easy
What does ROLLBACK do in a transaction?
- AUndoes the changes made since the transaction began
- BSaves all changes of the transaction permanently to disk
- CDeletes the table
- DRepeats the last statement
4.Medium
What does SELECT COALESCE(phone, 'unknown') FROM customers return for a customer whose phone is NULL?
- A'unknown'
- BAn empty string
- CAn error
- DNULL
5.Medium
A view in SQL is:
- AA stored query that behaves like a virtual table
- BAn index type
- CA copy of a table on disk
- DA screen in the database client for browsing tables
6.Medium
Why can a table have only one clustered index?
- AClustered indexes use too much memory
- BThe rows can be stored physically in only one order
- CThe SQL standard forbids more than one index on a table
- DClustered indexes can only be on the primary key
7.Hard
Two doctors on call each check that the other is still on call, then both sign off at the same time. Which anomaly can snapshot isolation still allow here?
- ADirty write
- BDirty read
- CWrite skew
- DNon-repeatable read within one transaction
8.Hard
What does the write-ahead logging (WAL) rule require?
- AA change's log record must reach stable storage before the changed data page does
- BEvery query must be logged before it is parsed
- CThe log is written only after a crash
- DData pages must be written before the log
Answer key
- 1. B · DELETE
- 2. D · A missing or unknown value
- 3. A · Undoes the changes made since the transaction began
- 4. A · 'unknown'
- 5. A · A stored query that behaves like a virtual table
- 6. B · The rows can be stored physically in only one order
- 7. C · Write skew
- 8. A · A change's log record must reach stable storage before the changed data page does
Full step-by-step solutions: practise this topic on examproblems.com.