JOAOSANTACRUZ.COM

Check if a certain value is NULL or Empty then replace it by something else

Check if a certain value is NULL or Empty and replace it by some other field or constant value.


						

# Check if a certain value is NULL or Empty and replace it by something else. 

# I have this scenario where an application is getting its contents in the website backoffice.
 
# To solve the problem of having empty values

SELECT id, IFNULL(name, 'Undefined') as name FROM clients WHERE id=2736

Go Back