I have a view
matches_view
returning the following:
id | name | wins | losses | matches
----+----------------+------+--------+---------
2 | Peter | 1 | 2 | 3
1 | Kevin | 3 | 1 | 4
3 | John | | 1 |
How can I replace the empty columns in the last row with 0s in postgreSQL?
You can use COALESCE(<expression>, 0)
for numeric columns in any case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With