1. 程式人生 > >存儲過程遊標應用

存儲過程遊標應用

open select creat oca userinfo eat var ubi return

CREATE PROCEDURE userinfor2
@id int,
@UserID int output
AS
BEGIN
declare youbiao(遊標名) cursor for select id from UserInfor where [email protected]
declare @getid varchar(400)
open youbiao(遊標名)
begin
fetch next from youbiao(遊標名) into @getid (賦值)
update UserInfor set [email protected]+‘‘+‘111‘ where [email protected]

/* */
end
close youbiao
deallocate youbiao
return @UserID
END

存儲過程遊標應用