摘要: 1,原子性,不可分割,要么全成功,要么全失败 2,一致性, 3,隔离性(并发) 1),脏读:一个事务读到其他事务未提交的数据 2),不可重复读:一个事务读到其他事务已经提交的事务(update语句进行操作) 3),虚读,幻读:一个事务读到其他事务已经提交的事务(insert语句的操作) 4,持久性, 阅读全文
posted @ 2016-06-05 19:34 小啊菜鸡 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 指的是设置一个标记,紧接着回滚到某个点,然后commit,但是,标记之前的事务是你想要的, package cn.itcast.transaction; import java.sql.Connection;import java.sql.PreparedStatement;import java. 阅读全文
posted @ 2016-06-05 19:28 小啊菜鸡 阅读(566) 评论(0) 推荐(0) 编辑
摘要: package com.j1; import java.sql.Connection; import java.sql.SQLException; import com.mysql.jdbc.PreparedStatement; public class JdbcTest1 { public void test1(){ Connection conn=null; PreparedSta... 阅读全文
posted @ 2016-06-05 19:13 小啊菜鸡 阅读(191) 评论(0) 推荐(0) 编辑