嗨,我有这个用于搜索员工信息的存储过程。我希望用户可以选择输入 ID、名字或姓氏。但是当我执行这个存储过程时,它需要其他参数。
create proc searchtry
@empID int,
@firstname varchar(20),
@lastname varchar(20)
as
begin
select fld_EmployeeId,fld_EmployeeFirstName,fld_EmployeeLastName
from Reference.tbl_EmployeeDetails
where fld_EmployeeId like @empID
OR fld_EmployeeFirstName like @firstname
OR fld_EmployeeLastName like @lastname
end