摘要: 1、创建存储过程SQL语句#创建存储过程create procedure mysql_add(in x1 int,in x2 int , out y int) begin set y := x1 + x2; end#调用存储过程call mysql_add(2,3... 阅读全文
posted @ 2018-03-06 17:09 crr121 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1、创建函数#创建函数create function fun_add(x1 int,x2 int) returns INT begin return x1 + x2; end#查看函数show function status;show function stat... 阅读全文
posted @ 2018-03-06 17:06 crr121 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1、脏读1.1避免脏读现象#避免脏读#开启事务Astart transaction;#关闭自动提交set @@autocommit = 0show variables like '%autocommit%'update student set name = 'kang... 阅读全文
posted @ 2018-03-06 17:06 crr121 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1、statement @org.junit.Test public void teststatement() throws Exception { long start = System.currentTimeMillis(); /... 阅读全文
posted @ 2018-03-06 17:03 crr121 阅读(232) 评论(0) 推荐(0) 编辑