Answers for "set variable in case statement sql server"

SQL
0

sql case sttement with set

UPDATE dbo.TestStudents  
SET     LASTNAME =  CASE  
                        WHEN LASTNAME = 'AAA' THEN 'BBB' 
                        WHEN LASTNAME = 'CCC' THEN 'DDD' 
                        WHEN LASTNAME = 'EEE' THEN 'FFF' 
                        ELSE LASTNAME
                    END 
WHERE   LASTNAME IN ('AAA', 'CCC', 'EEE')
Posted by: Guest on August-25-2021

Code answers related to "set variable in case statement sql server"

Code answers related to "SQL"

Browse Popular Code Answers by Language