SQL - Using COALESCE To Set Default Values


2 min read

What is COALESCE

  • Syntactic sugar for a CASE expression
  • Arguments must be of the same type
  • Checks if the first argument is null. If it is, it checks the next argument, until a not null value is found.
1SELECT COALESCE (table.rates,'0.00')
Previous post:
Docker - Stop And Remove All Containers
Next post:
Learn To Code Using Free Resources

Discussion