create Function IsOtherRestDay(@dDate smallDatetime )
returns int
as
begin
declare @re int
select * from table1 where a=@dDate
If @@rowcount >0
set @re=1
Else
set @re=0
return (@re)
end ------解决方案--------------------
create Function IsOtherRestDay(@dDate smallDatetime )
returns int
as
begin
declare @re int
if exists(select * from table1 where a=@dDate)
set @re=1
Else
set @re=0
return (@re)
end
------解决方案--------------------
if exists(select * from table1 where a=@dDate)
set @re=1
else
set @re=0