I made an integer
column that is null
by default but when I put empty double quotes ""
it gives this error:
ERROR: invalid input syntax for integer: ""
Does the integer
column have to be 0
then?
I am using Java to send the query to the database.
An integer column can be null, but ''
is an empty string not null. The right syntax for a null integer (or any other sql type) is null
.