In Postgres 9.3 when a field in a table has a null value the following expression doesn't work:
update table_statatistic set members = members + 1 WHERE user_id = $1;
However when the field has an integer value then this query increments it by 1 without a problem.
The questions are:
- Why is this happening.
- How to fix it.
nullyieldsnull. That's how SQL is specified. modern-sql.com/concept/null