38.7k views
5 votes
A(n) exclusive lock is automatically obtained when the user executes the SELECT...FOR UPDATE command.

a) Read lock
b) Shared lock
c) Write lock
d) Exclusive lock

User Anji R
by
7.5k points

1 Answer

2 votes

Final answer:

In SQL, the SELECT...FOR UPDATE command automatically places an exclusive lock on the selected rows, preventing other transactions from accessing them.

Step-by-step explanation:

When a user executes the SELECT...FOR UPDATE command in SQL, an exclusive lock is automatically obtained on the selected rows. This type of lock prevents other transactions from reading or writing to the locked rows. It is critical for maintaining data integrity during transaction processing. The correct answer to the question is d) Exclusive lock.

User Joe Amenta
by
7.6k points