Optional Parameters for Update
Posted on 2003-11-06
I am building an ASP application which will update a SQL Server database.
The app will, at various times, update several different fields within the same table. For example, if I am updating a customers table, I may need to update only address one time, and only phone number another time, and still yet other times, I may need to update all fields in the table. It seems like I shouldn't have to write separate stored procedures for each of these instances. How can I write my stored procedure such that I can update a variable number of fields each time it is called.