NVL() function in Postgre SQL
Do Postgre have any function that equals to NVL() of Oracle? of course, it do have the same function but with different name. Below is the systax:
coalesce(expr1, expr2, expr3,....)
this function’ll returns the first non-null expression that is passed to it.
Ex: SELECT coalesce(<column name 1>, <New value>), <Column name 2> FROM <Table name> WHERE <Some Condition>
If <Column name 1> is NULL, it’ll be replaced by <New value>
Advertisement
Categories: PostgreSQL
PostgreSQL
Thanks a lot