I have a table that contains ID, lastname and firstname of a person. How to make my stored procedure handle the where conditions using only stored procedure.
SELECT * FROM person where lastname = @lastname
SELECT * FROM person where firstname = @firstname
SELECT * FROM person where ID = @id
Instead of making three stored procedure, I need to do it entirely in one sp.