How to modify SQL table data with a different batch statement

Use a statement to bulk modify data, and where the use case when:

update tblUpdate

set Col2 = (case when Id = 1 then 'third modified 5' 

                           when Id = 2 then 'third modified 5'

                            else 'third modified 5'

                   end

                  )

where Id = 1 or Id = 2;

 

Guess you like

Origin www.cnblogs.com/ljx111/p/12613118.html