Update a mysql column via bash script

Hello,

I want to check the value of all MySQL columns.(column name is "status") via bash script.

If value is "0" at I want to make only single column value to "1"

I have many "0" values on mysql database(on "status" column)

"0" means it is a draft post. I want to publish a post. I want for every check/update just single post to publish.( first found or random)

Table name: files
column name: status

Thank you very much.

Why do you think DDL on a table to be done via script? Is this going to be repeated activity?

In MySQL you can use IF( ) as you would have use DECODE( ) instruction in Oracle