I have a MySQL table called Cars. The Cars table has three columns: id int auto increment, foo varchar(255), bar varchar(255).
I want to simply update all rows in the Cars table into the bar column with the same value from foo if foo is not null. So both foo and bar will have the same value after the update wherever foo is not null.
1 Answer