Search
 
SCRIPT & CODE EXAMPLE
 

SQL

SQL Multiple Cases

SELECT customer_id, first_name,
CASE
    WHEN country = 'USA' THEN 'United States of America'
    WHEN country = 'UK' THEN 'United Kingdom'
END AS country_name
FROM Customers;
Comment

PREVIOUS NEXT
Code Example
Sql :: adding constraints to columns SQL 
Sql :: output table plsql 
Sql :: mariadb json_extract 
Sql :: sql change date format 
Sql :: postgresql function 
Sql :: oracle drop job if exists 
Sql :: version and edition of SQL Server Database Engine 
Sql :: update con select postgresql 
Sql :: sql create database 
Sql :: creating index in mysql 
Sql :: activate log mariadb 
Sql :: sql between operator 
Sql :: inner join distinct 
Sql :: reset auto increment mysql 
Sql :: postgres user permissions 
Sql :: sql order by alphabetical 
Sql :: oracle select into 
Sql :: installing mysql on centos 7 
Sql :: oracle duration between timestamps 
Sql :: sql server remove primary key without dropping table 
Sql :: what is datetime in sql server 
Sql :: combine 2 columns search query mysql 
Sql :: sqlite insert or update 
Sql :: date sql 
Sql :: how to get initials in sql 
Sql :: create table with timestamp postgresql 
Sql :: mysql not equal 
Sql :: run function in sql 
Sql :: sql ending with vowels 
Sql :: mysql remove unique key 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =