create proc ist @Name char(9),@IdentityType char(9)
as
declare @SID int
select @SID=MAX(strid) from SecurityIdentity
if (@SID is null)
select @SID=1001
else
select @SID=@SID+1
insert into SecurityIdentity values (@SID,'test1','UserAccount')
go
调用就可以直接
exec ist 'test1','UserAccount'