Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
use crap
go
drop table x
go
create table x(c1 int primary key, c2 int not null)
go
create proc updates
as
insert into x values (1,1)
insert into x values (1,2)
insert into x values (2,1)
insert into x values (3,1)
update x set c1 = 2 where c1 = 3
insert into x values (4,1)
go
updates
go
select * from x
Use crap
go
drop table x
go
drop proc updates
go
create table x(c1 int primary key, c2 int not null)
go
create proc updates
as
declare @e int
begin tran
insert into x values (1,1)
set @e = @@error
if @e <> 0
begin
if @e = 1243
begin
-- do sometning non standard
select * from sysobjects
end
else
begin
rollback
return
end
end
insert into x values (1,2)
set @e = @@error
if @e <> 0
begin
if @e = 1243
begin
-- - do sometning non standare
select * from sysobjects
end
else
begin
rollback
return
end
end
insert into x values (2,1)
set @e = @@error
if @e <> 0
begin
if @e = 1243
begin
-- - do sometning non standare
select * from sysobjects
end
else
begin
rollback
return
end
end
insert into x values (3,1)
set @e = @@error
if @e <> 0
begin
if @e = 1243
begin
-- - do sometning non standare
select * from sysobjects
end
else
begin
rollback
return
end
end
update x set c1 = 2 where c1 = 3
set @e = @@error
if @e <> 0
begin
if @e = 1243
begin
-- - do sometning non standare
select * from sysobjects
end
else
begin
rollback
return
end
end
insert into x values (4,1)
set @e = @@error
if @e <> 0
begin
if @e = 1243
begin
-- - do sometning non standare
select * from sysobjects
end
else
begin
rollback
return
end
end
commit
go
updates
go
select * from x