D
D
DERBIAGLOBALISTO2019-09-25 15:12:57
SQL
DERBIAGLOBALISTO, 2019-09-25 15:12:57

How to write a sql query to replace null with 0?

We need a query that will convert the value of the column to 0 if it is null, but if not, then the value of the column should be returned.

'select price + price2 + price3  as suma from prices'

It's just that if one of the columns has a null value, then suma also gets null. Help solve the problem.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question