Here's what I want to do:
Given a table
PeopleOutfit (id int primary key, boots int, hat int)
And a stored procedure
UpdateOutfit @id int, @newBoots int = null, @newHat = null
Is there a way to tell whether I called this procedure as
exec UpdateOutfit @id=1, @newBoots=null, @newHat=5
effectively telling that the person with id of 1 must now be barefoot and wear fifth hat from
exec UpdateOutfit @id=1, @newHat=5
that instructs this person to wear fifth hat keeping his current boots?
In other words, I want to tell (within the stored procedure) if "the default value was used because it was not specified" from "I explicitly called this procedure passing the value that happens to be the same as default one".
I know there are several ways of accomplishing what I want to do such as passing XML or bitmask of fields being updated, but for the moment I just want to make sure whether this exact technique is possible or not.
Edit: Passing reserved values does not work for fields with small range types such as bit. Overloading procedures is also an option that's not acceptable. Creating user-defined type that extends NULL paradigm with additional "NotAValue" value might be an answer, but I need some more guidance on how to implement it.