sql server 在存储过程中使用事物
来源:互联网 发布:seo牛人 编辑:程序博客网 时间:2024/06/05 17:50
===============================================在存储过程中使用事物=================================================================
use db_sql2008
if exists(select name from sysobjects where name='EventProc1' and type='P')
drop procedure EventProc1
go
create procedure EventProc1
as
declare @truc int
select @truc=@@TRANCOUNT
if @truc=0
begin tran p1
else
save tran p1
if(@truc=2)
begin
rollback tran p1
return 25
end
if (@truc=0)
commit tran p1
return 0
use db_sql2008
if exists(select name from sysobjects where name='EventProc1' and type='P')
drop procedure EventProc1
go
create procedure EventProc1
as
declare @truc int
select @truc=@@TRANCOUNT
if @truc=0
begin tran p1
else
save tran p1
if(@truc=2)
begin
rollback tran p1
return 25
end
if (@truc=0)
commit tran p1
return 0
阅读全文
0 0
- sql server 在存储过程中使用事物
- sql存储过程中使用事物
- 在SQL SERVER 2005存储过程中,使用循环语句
- 如何在C#中使用存储过程(SQL Server 2000)
- 在SQL SERVER 2005存储过程中,使用循环语句
- 中信房屋:SQL Server在存储过程中使用游标
- 在asp.net中使用sql server存储过程 (包括SqlDataAdapter调用存储过程)
- SQL SERVER存储过程中使用事务
- SQL SERVER存储过程中使用事务
- SQL Server中在存储过程中使用游标修改表中数据
- 在存储过程中使用动态sql
- SQL在存储过程中使用递归
- 在.net中使用sql存储过程
- SQL 在存储过程中使用游标
- Sql server中在存储过程中创建视图
- 在SQL Server中使用SQL语句查询一个存储过程被其它所有的存储过程引用的存储过程名
- sql server中存储过程
- Sql Server使用存储过程
- BZOJ4537[HNOI2016]最小公倍数
- 定义一个图形类及其子类(三角形类和矩形类),分别计算其面积和周长。
- Pig join cogroup 介绍
- OpenStack API 认证和 API 请求工作流程
- linux环境mysql5.7.20安装
- sql server 在存储过程中使用事物
- 能装机,能在无光驱的实机稳定启动的reactos版本
- 5.1 二叉树的顺序存储实验
- 公专星沙考场科目三考试考前相关注意事项
- 华为研发工程师编程题3
- 用选择法对10个数由小到大排序
- 认证鉴权与API权限控制在微服务架构中的设计与实现(一)
- 微信jssdk基本使用
- capstone训练营2017-12-11