|
发表于 2020-1-16 11:18:02
|
显示全部楼层
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER procedure CombinedSearch
@StartTime smalldatetime,
@EndTime smalldatetime,
@empState varchar(100)= null
as
if @empState is not null
select * from jobseeker
where (@StartTime<=InterviewTime and @EndTime>=InterviewTime) and empState=@empState
else if @empState is null
select * from jobseeker
where (@StartTime<=InterviewTime and @EndTime>=InterviewTime)
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO |
|