表结构 create table users 用游标遍历表 declare @id int, @name nvarchar(50) 自定义函数 alter function dbo.up_fun declare @n nvarchar(4000)
事务
declare @errorSum int
set @errorSum = 0 begin transaction -- set @errorSum = @errorSum + @@error
if(@errorSum <> 0)
begin raiserror('操作失败!',16,1) rollback transaction end else begin raiserror('操作成功',16,1) commit transaction end |
sql中游标等一些对象的使用
最新推荐文章于 2022-05-18 15:27:07 发布