I\'m writing some stored procs in SQL Server 2008, and wondered if the concept of optional input parameters is possible here?
I suppose I could always pass in NULL
Yes, it is. Declare parameter as so:
@Sort varchar(50) = NULL
Now you don't even have to pass the parameter in. It will default to NULL (or whatever you choose to default to).