miércoles, 21 de enero de 2015

Replace Null by zero in SQL

There is the COALESCE method which return the first non-null parameter, in your case :
COALESCE(field, 0)
But you can use this if you want more :
COALESCE(field1, field2, 0)

No hay comentarios: