📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

What is an exclusive lock?

A. A lock on the whole database only
B. A lock that gives one transaction sole access for writing ✅
C. A lock that allows all reads
D. A lock that never blocks

Correct Answer: B. A lock that gives one transaction sole access for writing

Explanation

  • An exclusive lock is held for writing and blocks other transactions from the data.
  • It is released at commit or rollback.