In my stored procedure I have a large amount of data that can be updated. What I would like to do is not update anything that is passed into the stored procedure as NULL. How can I accomplish this?
Basically I'm looking for something like this:
Code:UPDATE [MySchema].[MyTable] SET IF (@MyField IS NOT NULL) BEGIN MyField = @ MyField END WHERE @UserID = UserID


Reply With Quote