I have a procedure to update some values in a table. My question is if it's best to check if a value has changed before updating it, or if SQL already does that by itself. How does MS SQL go about updating a lot of values even if they didn't change.
I'm just using this atm..
where if I don't have to check for changes in the parameters I can just do a count * instead of a select to save recources ???
Many thx
I'm just using this atm..
Code:
ALTER PROCEDURE dbo.updnavigation
@id int,
@parent int,
@text int,
@name nvarchar(50)
AS
if exists(select * from tlkpnavigation where id = @id)
Begin
UPDATE tlkpnavigation SET parent = @parent, text = @text, name = @name
WHERE (id = @id)
End
RETURN
where if I don't have to check for changes in the parameters I can just do a count * instead of a select to save recources ???
Many thx