server-re/decomp/schema/RustyHearts_Auth/procs/up_insert_agentaccount.sql

24 lines
413 B
Transact-SQL

CREATE procedure [dbo].[up_insert_agentaccount]
@Account nvarchar(16),
@Password nvarchar(16)
as
BEGIN
set nocount on
BEGIN TRAN
if NOT EXISTS (select Account from dbo.AgentAccount with (nolock) where [Account] = @Account)
begin
insert into dbo.AgentAccount ( [Account], [Password] ) values
( @Account, @Password );
end
if(@@error <> 0 )
BEGIN
ROLLBACK TRAN
return
END
COMMIT TRAN
END