I posted this question on stack overflow, but his might be a better place for it. Reference: http://stackoverflow.com/questions/23498901/mysql-update-default-value-of-column-in-multiple-tables-from-an-inner-select-sta
I need to update the default value of all
Synced fields in a database tables.
I've looked at several other posts and put together the following, which I'm missing something, any ideas?
ALTER TABLE ( SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA != 'mysql' AND TABLE_SCHEMA != 'information_schema' AND COLUMN_NAME = 'Synced' ORDER BY TABLE_NAME ASC) CHANGE `Synced` `Synced` TINYINT DEFAULT 0;
I've referenced the following to put it together:
Any help is appreciated.