Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql if empty then

SELECT COALESCE(NULLIF(SomeColumn,''), ReplacementColumn)
FROM SomeTable
Comment

sql is null or empty

WHERE ISNULL(column_name);
#Can also use
WHERE column_name IS NULL;
#Example with join
SELECT title FROM series
LEFT JOIN reviews
    ON series.id = reviews.series_id
    WHERE ISNULL(rating);
Comment

PREVIOUS NEXT
Code Example
Sql :: SQL UNION ALL Operator 
Sql :: mysql if condition 
Sql :: average sql 
Sql :: mysql collation for all languages 
Sql :: primary key multiple colums 
Sql :: postgresql get connection string 
Sql :: sql distinct only one column 
Sql :: Get first name and last name from full name string in SQL 
Sql :: oracle partition table row count 
Sql :: how to count number of rows in sql 
Sql :: MYSQLI_ASYNC 
Sql :: How to drop procedures in mysql ? 
Sql :: osx stop mysql service 
Sql :: mysql delete rows 
Sql :: select top 3 sql 
Sql :: oracle list proxy users 
Sql :: sql convert date format 
Sql :: mysql select count 
Sql :: setting default value for Boolean data type in SQL 
Sql :: create table as select * from table mssql 
Sql :: replace divide by zero error with 0 in sql 
Sql :: mysql import database 
Sql :: postgre insert select 
Sql :: postgresql procedure example 
Sql :: sqlite show columns 
Sql :: sql Split string function 
Sql :: oracle select invalid views 
Sql :: orderBy sqlalchemy 
Sql :: sql server management studio reset cache 
Sql :: select the date 30 days less that the todays date sql request 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =