What's the equivalent of SQLite IFNULL()
in Postgres?
I need to execute a query (sqlite in Ruby):
SELECT ifnull(max(code_id) + 1, 1)
FROM configentries
WHERE configtable_id = ...
What would it look like if I want to get the same result with PostgreSQL?
source
to share