Search
 
SCRIPT & CODE EXAMPLE
 

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

PREVIOUS NEXT
Code Example
Sql :: start mysql 
Sql :: create pl/sql stored procedure 
Sql :: select distinct 
Sql :: Alter table add column in SQL Server- NAYCode.com 
Sql :: postgres statistics 
Sql :: is between inclusive or exclusive sql 
Sql :: MySQL server is running with the –secure-file-priv 
Sql :: update using case in mysql 
Sql :: truncate function in sql oracle 
Sql :: command line mysql xampp 
Sql :: @sqlresultsetmapping 
Sql :: rename database in sql 
Sql :: mysql where value is null 
Sql :: datediff in sql server 
Sql :: how to check the mysql version mac 
Sql :: add column text sql after column 
Sql :: t-sql delete view if exists 
Sql :: mysql command not working in linux 
Sql :: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client vs code 
Sql :: sequelize migration default value 
Sql :: sql create view 
Sql :: kill a pid redshift 
Sql :: how to retrive the today date sql 
Sql :: mysql delete duplicate rows but keep one 
Sql :: myswql show full processlist 
Sql :: drop column from local database postgres pgadmin 
Sql :: how to count null values in sql 
Sql :: constraints to columns SQL 
Sql :: Parsing XML IN SQL Server 
Sql :: sqlite unique 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =