I have a table with 18 columns (all Ints) and 1040 rows. If any value is zero I want to change it to 1. I am using Postgresql. What is the best way to do this. I cannot come up with a simple update statement… and I am new to DBs.
Any pointers on what I should look at to learn how to achieve something like this… (I would think some sort of script, if such thing exists for postgresql.. I don’t know)
Thanks
How about this
But you will need a query for each column, or