DECLARE @id INT = 100 UPDATE Device SET Enabled = 1 WHERE ID <= @id UPDATE CustomInputAdapter SET Enabled = 1 WHERE ID <= @id