Ward Pond's SQL Server blog

Ruminating on issues pertinent to the design and development of sound databases and processes under Microsoft SQL Server 2008, SQL Server 2005, and SQL Server 2000 (while reserving the right to vent about anything else that's on my mind)

Database Programming: Nearing Capitulation On Optional Parameters

Database Programming: Nearing Capitulation On Optional Parameters

  • Comments 1
  • Likes

Adam and Tony both left comments indicating that either flavor of my proposed optional parameter syntax will result in a table scan, and that performance will (to appropriate Tony's characterization) suck.  That's quite correct.

There's one more syntax construction I need to take a look at, and I'll try to get to that sometime this week (when I'm not busy relaxing.. :)).  If that doesn't work, I'll capitulate defeat and admit that dynamic SQL is the one, true path for implementation of optional parameters in T-SQL.

I'll be eating crow sometime later this week (or not.. :)).  Until then..

Happy summer!


  • Well, the current leg of the great "optional parameter code-off" has been completed.  You definitely...

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment