您基本上是在描述
COALESCE函数:
https://www.postgresql.org/docs/9.6/static/functions-
conditional.html
在您的情况下:
SELECt id, COALESCE(name, alias) AS result FROM yourtable;

您基本上是在描述
COALESCE函数:
https://www.postgresql.org/docs/9.6/static/functions-
conditional.html
在您的情况下:
SELECt id, COALESCE(name, alias) AS result FROM yourtable;