Mysql calling procedure failed when dynamically alter table in it
问题 I want to alter my tables dynamically based on whether the table has specific column. My database name is summer_cms , and there are over 50 tables in it. What I want are below: If a table has a column named add_time , then I would like to add a column add_user_id in it. Similarly, I would like to add update_user_id in the table if update_time is found. I know I should get it down in the process of creating the database schemas, but my database has been built and I have to alter it by need.