Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3072158
  • 博文数量: 1412
  • 博客积分: 15478
  • 博客等级: 上将
  • 技术积分: 14938
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-23 16:08
文章存档

2016年(1)

2015年(17)

2013年(13)

2012年(103)

2011年(185)

2010年(261)

2009年(425)

2008年(363)

2007年(44)

分类:

2009-06-23 22:22:41

事务transaction
   控制一部分语句做为一个单元来执行,与存储过程不同的是,存储的新文件形成后,再提取时,具体命令不用重复写了,只写一个名子就行。而事务是对一段命令的控制,所需命令不能省略。
比如我们去银行取钱,卡插入后,突然停电,钱没有出来,就需要取消,回到原处,见下:
SQL sever
begin transaction
delete stuClass
delete studentScore
delete studentSubject
rollback取消
 
钱取出来后,才能确定,命令如下:
commit确定
select * from studentClass
select * from studentScore
select * from studentSubject
阅读(719) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~