1.事务的开始结束:
START TRANSACTION :标记事务开始
COMMIT :标记事务成功结束
ROLLBACK :标记事务夭折
2.设定事务只读、读写性质:
SET TRANSACTION READ ONLY:设定事务为只读事务
SET TRANSACTION READ WRITE : (默认状态) 设定事务为读写事务
3.设置隔离性
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED : 读未提交
SET TRANSACTION ISOLATION LEVEL READ COMMITTED: 读提交
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ: 可重复读
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE: 串行化(默认状态)