Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set all the 0 values to NULL

How can I set all the 0 values to NULL in an SQL table ?

Thanks in advance.

like image 283
Marshal Avatar asked Nov 22 '10 12:11

Marshal


1 Answers

update table set col = null where col = 0
like image 141
NimChimpsky Avatar answered Oct 05 '22 04:10

NimChimpsky