Can you please let me know if stored procedure allow to handle compound condition as below:
if(
( (select Count(*) from dbo.Membership where EmailID=@emailID) >0)
||
((select Count(*) from dbo.Allocation where ResourceEmail=@emailID)>0))
)
Use
ORinstead of||More optimal if just checking for existence, I’d use EXISTS instead of COUNT as it will stop when it first the first existence, instead of counting them all…