DevBits
Home
Atlas
Play
About
Sign up
Log in
All
SQL
Databases
Coalesce in Postgres
Coalesce in Postgres
Posted by
yhuang
Public (Editable by Users)
Returns the first non null value.
Language
SQL
Dependencies
None
Run
Play
Copy
Copy To
Default Playground
Expand
Fork
Edit
Main
SELECT COALESCE (1, 2); // 1 SELECT COALESCE (NULL, 2 , 1); // 2
Stdout
Stderr