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



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!