So I want to be able to update a row in my table. I know how to do this
UPDATE Param
SET(Param1=@Param1, Param2=@Param2, Param3=@Param3, ...)
WHERE ParamId = @ParamId
The problem is that I don't know which column will be updated and which isn't, it depends on what the user changed. And I have a lot of param to to check.
--idk if this will work, I am just trying to limit the amont of code posted
ISNULL(@Param1, Select Param1 from Param where WHERE ParamId = @ParamId)
I was thinking about dynamic SQL, but it poses to much of a security risk. Is there a way for me to do this faster? Or is there no way around this? If you need more info please ask.