【Mysql】lock tables

The LOCK TABLES privilege enables the use of explicit LOCK TABLES statements to lock tables for which you have the SELECT privilege. This includes the use of write locks, which prevents other sessions from reading the locked table

create database Susake;

use Susake;

create table Test(a int, b int);

lock tables Test read;

unlock tables;

insert into Test values(1, 2);

drop table Test;

drop database Susake;

 

posted on 2014-03-29 01:50  至死丶不渝  阅读(227)  评论(0编辑  收藏  举报

导航