lw_addPerson.sql
If Exists (Select * From sysobjects Where name = N'lw_addPerson' And user_name(uid) = N'dbo')
Drop Procedure dbo.lw_addPerson
Go
CREATE Procedure lw_addPerson
(
@studentId nvarchar(12),
@firstName nvarchar(50),
@lastName nvarchar(50),
@alias nvarchar(50),
@password nvarchar(32),
@street nvarchar(64),
@city nvarchar(32),
@region nvarchar(15),
@postalCode nvarchar(10),
@country nvarchar(15),
@phone nvarchar(24),
@contact nvarchar(50),
@contactPhone nvarchar(24),
@contactRelationship nvarchar(24),
@releaseInfo nvarchar(16),
@personId int OUTPUT
)
As
set nocount on
insert into person values(@studentId,@firstName,@lastName,@alias,
@password,@street,@city,@region,@postalCode,@country,@phone,
@contact,@contactPhone,@contactRelationship,@releaseInfo)
select @personId = @@IDENTITY
return @@ERROR
Go