摘要:
事务模拟转账 A向B转账100元,基于事务的ACID原则,前后的总钱数必须一致,简单的sql语句如下,而且两个语句一起执行才能完成转账这一事务,否则金额会出错。 update account set money= money-100 where name='A' update account set 阅读全文
摘要:
JDBC模板 public class mysql { public static void main(String[] args) throws ClassNotFoundException, SQLException { //加载驱动 Class.forName("com.mysql.jdbc. 阅读全文