How to search exact value in sql
Posted on 2011-04-27
i would like to return the success or failure based on the following search ..
in parameters are fname,lname,email,phone .. i m fetching the customer_Table like this to find the exact results
i would like to return success if any of three matches
as of now i have split the query and written like this
select count(1) from customer_table where f_name =fname and l_name=lname
and phone_no = phone and e_mail = email;
select count(1) from cstomer_table where f_name=fname and l_name=lname and phone=no
select count(1) from cstomer_table where f_name=fname and l_name=lname and e_mail=email .
like this i have writttern five querys to achieve the requirements,..
is there any otherway to get the results