Create table #temp (
pid int,
name varchar (50)
)
insert into #temp select 1,'a' union all
select 2,'b'
select * from #temp
UPDATE #temp SET name = CASE pid WHEN 1 THEN 'aa' WHEN 2 THEN 'bb' END WHERE pid IN (1,2)
-Shinu
Join the conversation! Your thoughts help the community grow.