I have a database, and I need to alter every single
tinyint(1) default null
column (and incidentally, every value in those columns set to null) in every single table in that database to:
tinyint(1) not null default 0
as soon as possible.
What is the fastest / most efficient way to achieve this, (programmatically or otherwise)?
Query
information_schema.COLUMNSview for a list of tables/columns, then use your programming language of choice to loop through the results and performALTER TABLEqueries.