CREATE PROCEDURE [SP_PersonelInfo](
@personelcode varchar(20),
@firstname nvarchar(50),
@lastname nvarchar(50),
@FK_pID int,
@employmenttype nvarchar(50),
@employmentdate char(10))
as
set nocount on
begin
insert into PersonelInfo(PersonelCode,FirstName,LastName)
Values(@personelcode,@firstname,@lastname)
DECLARE @lstprsnlID INT
set @lstprsnlID = SCOPE_IDENTITY();
insert into PersonelInfo(FK_pID,EmploymentType,EmploymentDate)
Values(@lstprsnlID,@employmenttype,@employmentdate)
END
set nocount off