Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...



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

Search: