`
javazbpm
  • 浏览: 2924 次
社区版块
存档分类
最新评论

sqlserver数据库事务

 
阅读更多
create table AA_student
(
  id int PRIMARY KEY IDENTITY(1,1),
  name varchar(10),
  age int
)


alter PROCEDURE API_FLOWTEST
as
BEGIN
SET XACT_ABORT ON
begin tran
insert into AA_student(name,age) values('中国人民a',null);
insert into AA_student(name,age) values('中国人民共中国人民共中国人民共',null);  --插入name,字符超过定义大小
insert into AA_student(name,age) values('中国人民b',null);
commit tran
end

declare @result int
exec @result = API_FLOWTEST
print @result
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics