Answers for "sql update statement case when"

SQL
1

sql case update

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 May-05-2021

Code answers related to "sql update statement case when"

Code answers related to "SQL"

Browse Popular Code Answers by Language