Hi,
I want to show data in a grid with certain conditions.
1. Method
I wrote one sp with if else condition
if(@type==1)
select * from table where status=1
else if(type !=1)
select * from table where status!=1
2. Method
i pass two command parameter
@type
@status
and in sp i wrote
if(@type=' '
select * from table where status=@status
which method is better in performance wise.
please suggest me
new to this field