You may initialize default value to
@emp
as below.
Set @emp = '';
Probably their is no records in your
student_master
Table for the value you are passing for parameter
@employeename
.
Or you may keep your check on the basis of
count
as below.
Declare @empCount as int;
select @empCount=count(First_Name) from student_master where First_Name=@employeename;
if(@empCount=0)
begin
print'sucess'
end
else
begin
prnit 'inserted'
end