Du beskriver i princip COALESCE
funktion:
https://www.postgresql.org/docs/9.6/static /functions-conditional.html
I ditt fall:
SELECT id, COALESCE(name, alias) AS result FROM yourtable;
Du beskriver i princip COALESCE
funktion:
https://www.postgresql.org/docs/9.6/static /functions-conditional.html
I ditt fall:
SELECT id, COALESCE(name, alias) AS result FROM yourtable;