Sample Exam Questions

From the objective of OSS-DB Exam Silver
S3.3 Transactions (LOCK statement)

Sample Question

3.58

When executing 'LOCK TABLE t1;', choose the correct operation that other transactions are allowed to perform on table t1.

  1. SELECT statement

  2. INSERT statement

  3. UPDATE statement

  4. TRUNCATE statement

  5. Operations A-D are not allowed

※This sample exam is different from those that appear in the actual OSS-DB Exam.
2024/05/10

Answer and Explanation

LOCK TABLE acquires a lock at the table level. By default, ACCESS EXCLUSIVE is used as the lock mode.
This is the most restrictive lock and conflicts with all operations in PostgreSQL.

Therefore, the correct answer is E.