-2

I want make a update query in sql-server which can update any null value to zero in a table.

jarlh
  • 42,561
  • 8
  • 45
  • 63
Biddut
  • 418
  • 1
  • 6
  • 17

2 Answers2

1

This basic request will do it:

UPDATE <Table> SET <Column to update> = 0 WHERE <Column to update> IS NULL;

NB: Capital letters are not relevant.

Yassine Badache
  • 1,810
  • 1
  • 19
  • 38
Ganesh
  • 486
  • 3
  • 8
  • 18
1

Try IFULL()

SELECT IFNULL(column_name, 0) FROM table_name;