Yes, by using COALESCE
.
SELECT COALESCE(null_column, 0) AS null_column FROM whatever;
COALESCE goes through the list of values you give it, and returns the first non-null value.
More Related Contents:
- MySQL comparison with null value
- MySQL CONCAT returns NULL if any field contain NULL
- Why in SQL NULL can’t match with NULL?
- get first occurrence of last changed value of a column [closed]
- INSERT INTO SELECT statement with more columns which is not in another table
- multiple query same table but in different columns mysql
- How can I make SQL case sensitive string comparison on MySQL?
- 1052: Column ‘id’ in field list is ambiguous
- How to do a batch insert in MySQL
- Count the occurrences of DISTINCT values
- Creating a “Numbers Table” in MySQL
- Why does MySQL allow “group by” queries WITHOUT aggregate functions?
- Cumulative sum over a set of rows in mysql
- Set NOW() as Default Value for datetime datatype?
- Add Auto-Increment ID to existing table?
- MySQL SELECT DISTINCT multiple columns
- SQL DELETE with JOIN another table for WHERE condition
- mysql trigger stored trigger is already used by statement which invoked stored trigger
- Error Dropping Database (Can’t rmdir ‘.test\’, errno: 17)
- Using group by on two fields and count in SQL
- Can MySQL convert a stored UTC time to local timezone?
- mysql update query with sub query
- What is the difference between the backtick and the square bracket in SQL statements?
- Integrity constraint violation: 1452 Cannot add or update a child row:
- Alternative to using LIMIT keyword in a SubQuery in MYSQL
- How to insert a file in MySQL database?
- What does SQL Select symbol || mean?
- SQL query with avg and group by
- Optimistic locking in MySQL
- Insert and set value with max()+1 problems