@@与@的区别
# 用户自定义的变量 (User variables are written as @var_name)
@x
# global或session变量 (@@global @@session )
@@x
# @@查看全局变了:
select @@log_error;
select @@FOREIGN_KEY_CHECK;
# @设置全局变量值
set @t1=0,@t2=0, @t3=0;
# 5 5 1 4
select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3;
1.查看当前会话隔离级别
select @@tx_isolation;
2.查看系统当前隔离级别
select @@global.tx_isolation;
3.设置当前会话隔离级别
set session transaction isolatin level repeatable read;
4.设置系统当前隔离级别
set global transaction isolation level repeatable read;
5.命令行,开始事务时
set autocommit=off 或者 start transaction
网友评论