Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql case when null

SELECT IF(guides.colName IS NULL, 'Yes','No') FROM tableName;

-- Or
SELECT
	CASE 
      WHEN colName IS NULL THEN 'Yes'
      ELSE 'No'
	END
FROM tableName;
Comment

PREVIOUS NEXT
Code Example
Sql :: how to truncate a table in databse 
Sql :: user privileges postgresql information_schema 
Sql :: sql server query list all databases 
Sql :: how do you use sql in you company 
Sql :: insert into table from another table mysql 
Sql :: oracle limit user tablespace 
Sql :: t-sql select min from two values 
Sql :: Failed to connect to localhost:1433 - self signed certificate 
Sql :: get current date data in mysql 
Sql :: mysql best varchar length size 
Sql :: SQL server query column yes or no 
Sql :: oracle sequence last_number 
Sql :: find nth highest salary of an employee 
Sql :: mysql sum cast decimal without round 
Sql :: login to mysql 
Sql :: how to get slow query log in mysql 
Sql :: how to update column name in psql 
Sql :: mysqldump: couldn 
Sql :: mysql concatenate columns 
Sql :: update query formula in excel 
Sql :: select columns table mysql 
Sql :: this week mysql 
Sql :: sql server: select column values as comma separated string 
Sql :: mysql remove only_full_group_by permanently 
Sql :: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint 
Sql :: buscar nombre de columna en todas las tablas sql server 
Sql :: how select a json value in mysql 
Sql :: how to get data between a last week in mysql 
Sql :: order by sql 
Sql :: sql server substring 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =