I'm writing a mysql workbench. I'd like to update a table and columns with a single query. Would I need to use a nested query or is what I'm trying to do not possible?
ALTER TABLE MyTable CHANGE id id2 int; // works
ALTER TABLE MyTable TO|RENAME MyTable2 CHANGE id id2 int; // fails
Yes. You can make multiple changes in one ALTER TABLE statement.
The syntax reference shows:
Note the optional additional
alter_optionseparated by comma.Demo: