This is how to enter a specific value in a column depending on the value of another column.
So we have a table called ‘t_main’ in a database called ‘db_sample’, and it looks something like this.
And we want to see if we can add the value ‘Full’ to the entries that have 30 or more in the stat column.
We can do this with this simple command
UPDATE `t_main` SET `Status` = 'Full' WHERE `Stat1` >= 30;
Now we end up with something like this