Hacker News new | past | comments | ask | show | jobs | submit login

Something along the lines of

  COALESCE(my_column, -1)
might work for you in this case. See [1] for documentation on it in Postgres (it is in ANSI SQL though).

[1]: https://www.postgresql.org/docs/current/functions-conditiona...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: