SQL Server - Update if parameter is null or empty then update existing value i.e. value
Update [Customer]
set FirstName = IsNull(@FirstName, FirstName),
AddressCity = IsNull(@City, AddressCity) ....
Where ...
above will Update the row with the param value if they are not null, otherwise update it to itself nothing change.
Comments
Post a Comment