Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql CASE

/*CASE statements are used to create different outputs and is 
  used by SQL as a way to handle if-then logic.*/
  
  SELECT column_name,
    CASE 
      WHEN condition THEN 'Result_1'
      WHEN condition THEN 'Result_2'
      ELSE 'Result_3'
    END
  FROM table_name;
 
PREVIOUS NEXT
Tagged: #sql #CASE
ADD COMMENT
Topic
Name
7+5 =