In SQL Server, when using optional parameters, the only way to have default values is using
@param = NULL upon creating.
Is there a way for the stored procedure to know that the application will only update specific columns and the remaining columns will retain the original values?
Here is my example:
col1 = "AA" col2 = "BB" col3 = "CC"
Application update inside stored procedure:
UPDATE table SET col3 = "C", col ="B" WHERE id = 1
After update, value of col1 will remain.
I hope my explanation is clear enough :)