Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

give a column name to values generated from case statement in sql

SELECT *, CASE WHEN a = 'test' THEN 'yes' END as value FROM (
   SELECT col1 as a FROM table
) 
 
PREVIOUS NEXT
Tagged: #give #column #values #generated #case #statement #sql
ADD COMMENT
Topic
Name
5+5 =