Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

else if sql

UPDATE table 
SET columnB = CASE fieldA 
        WHEN columnA=1 THEN 'x' 
        WHEN columnA=2 THEN 'y' 
        ELSE 'z' 
      END 
WHERE columnC = 1
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql
ADD COMMENT
Topic
Name
1+3 =