lock table

In transactions, you can use the lock table command to:

The table locks are released at the end of the transaction.

lock table allows you to specify a wait period. If the table lock cannot be granted within the wait period, an error message is printed, but the transaction is not rolled back.