Search
 
SCRIPT & CODE EXAMPLE
 

SQL

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')
Comment

PREVIOUS NEXT
Code Example
Sql :: sql ssrs 
Sql :: last mysql 
Sql :: mysql trigger to delete old data 
Sql :: oracle sql procedure return value 
Sql :: how to output a different column name in mysql 
Sql :: postgresql add not null and not empty constraint 
Sql :: Insert Multiple Rows at Once in SQL 
Sql :: right join 
Sql :: json object to column value in sql server 
Sql :: mysql select empty string 
Sql :: truncate in oracle sql 
Sql :: les jointures sql server 
Sql :: sql double quotes in string 
Sql :: new rails app with mysql 
Sql :: SQL Greater Than Operator 
Sql :: create view in oracle sql 
Sql :: sql query to linq converter online 
Sql :: delete from where sql 
Sql :: System.Diagnostics.Process is not supported on this platform 
Sql :: Which SQL statement would you use to remove a view called EMP_DEPT_VU from your schema? 
Sql :: sql on-premises 
Sql :: mysql set session timeout 
Sql :: sqlalchemy core in clause 
Sql :: create backup 
Sql :: how to see table associated with a schema in sql 
Sql :: sqlite update where exists 
Sql :: postgresql < ALL very slow 
Sql :: mysql type conversion 
Sql :: nuget sqllite-net-pcl 
Sql :: mysql error 1064 you have an error in your sql syntax 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =