MySQL Table Locking

MySQL CASE

Using MySQL Table Locking you can lock a table explicitly for preventing other sessions for a interval. Releasing a table lock can be granted for a client session only but not for other sessions.

Here is a simple format for Table Locking:

LOCK TABLE tbl [READ | WRITE]

LOCK TABLE tbl READ

To release a lock from a table use below syntax:

UNLOCK TABLES;

Leave a Reply

Your email address will not be published. Required fields are marked *