• The thing I'd suggest is that you write two stored procedures, which is essentially two methods. Then if you want to build an abstraction, write a 3rd that takes both parameters, if only one comes in (check for NULL), call one proc, otherwise call the other.

    That seems like work, but if you build it up in your app, you're essentially doing the same thing. By encapsulating this into multiple procs, you can easily call them from other places, and also it is tune-able if more results or columns are needed.