What is the best method of handling null parameters in store procedure ?
I have a store procedure with 3 input parameter any one of them parameter can be null so how to handle those parameter.
SP_GetDetails input parameter (varchar p1,varchar p2,int p3, datetime p4, datetime p5)
In sp there are different query based on input parameters. if(p1<>null) /// else if(p2<>null) /// else if()... so on...
So my question: Is it good to have n number of if condition.