标签:
create procedure sp_AddUser1
@Name nvarchar(200),
@Remark nvarchar(200),
@Flag int
as
begin
declare @id int
insert into User(Name,Remark,Flag) values(@Name, @Remark,@Flag)
set @id = scope_identity()
update User set Sort=@id where ID=@id
end
create procedure sp_AddUser2
@Name nvarchar(200),
@Remark nvarchar(200),
@Flag int,
@id int output
as
begin
insert into User(Name,Remark,Flag) values(@Name, @Remark,@Flag)
set @id = scope_identity()
end
标签:
原文地址:http://www.cnblogs.com/flywing/p/4193962.html