今天在写mybatis中的代码的时候,需要使用临时变量处理,比如
set @row:=0;
set @mid:=0;
select xxxxxxxx...
运行的时候会报语法错误,说在set @mid:=0这里有语法错误。
语句在mysql中执行没有问题。
请问各位大神,mybatis里面支持mysql这种临时变量的写法么,这种应该怎么样写呢
mysql连接url + allowMultiQueries=true
jdbc:mysql://localhost:3306/DBS?allowMultiQueries=true
MyBatis java and MySql local variables - Stack Overflow
不支持这种写法。mybatis中的参数都是中传进来的
不支持这种写法