93.0k views
3 votes
The ____ command can be used to view the contents of a record when it is anticipated that the record will need to be modified. It places a shared lock on the record(s) to be changed and prevents any other user from acquiring a lock on the same record(s).

A) SELECT...LOCK TABLE
B) COMMIT...LOCK TABLE
C) SELECT...FOR UPDATE
D) COMMIT...FOR UPDATE

1 Answer

3 votes

Answer:

The correct answer is B)

Step-by-step explanation:

The commit command allows us to:

• Consolidate, confirm

• committing refers to the idea of confirming a set of provisional changes permanently.

• A popular use is at the end of a database transaction.

The LOCK TABLE command should be used:

• when a lock of the mode specified in the table can be acquired.

• The command will wait for everything you need to get the lock,

• In case you cannot acquire the lock immediately, the NOWAIT option is specified so that the command cancels the transaction.

User Mandraenke
by
6.1k points