Sombra Ardente DUBLADO E LEGENDADO ONLINE | Kokoro Connect | Ant-Man and The Wasp 2018 NEW 720p HDCAM x264 AC3-24HD
 Examples for business, study, careers, love, and more...
Examples :: MYSQL Examples :: Example of Lock Tables and Unlock Tables Mysql Statement

Popular Examples

More MYSQL Examples

See all MYSQL Examples
report this ad

Example of Lock Tables and Unlock Tables Mysql Statement:

LOCK TABLES t1 READ;
SELECT COUNT(*) FROM t1;

LOCK TABLE t READ;
SELECT * FROM t AS myalias;
LOCK TABLES trans READ, customer WRITE;
SELECT SUM(value) FROM trans WHERE customer_id=some_id;
UPDATE customer
SET total_value=sum_from_previous_statement
WHERE customer_id=some_id;
UNLOCK TABLES;

Example of Mysql Lock Tables and Unlock Tables

LOCK TABLES
tbl_name [[AS] alias] lock_type
[, tbl_name [[AS] alias] lock_type] ...
lock_type:
READ [LOCAL]
| [LOW_PRIORITY] WRITE

UNLOCK TABLES