How to bulk change the number of fields in a MySQL library with 100 sheets

Source: Internet
Author: User

Enter view the number of fields in the table in the current library: Mediumint (6)

[Root@db-master ~]# SH alter_table.sh

ALTER TABLE USER_CAMPAIGN_0 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

0 finished.

ALTER TABLE user_campaign_1 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

1 finished.

ALTER TABLE user_campaign_2 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

2 finished.

ALTER TABLE User_campaign_3 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

3 finished.

ALTER TABLE User_campaign_4 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

4 finished.

ALTER TABLE user_campaign_5 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

5 finished.

ALTER TABLE User_campaign_6 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

6 finished.

ALTER TABLE user_campaign_7 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

7 finished.

ALTER TABLE User_campaign_8 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

8 finished.

ALTER TABLE User_campaign_9 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

9 finished.

ALTER TABLE USER_CAMPAIGN_10 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Ten finished.

ALTER TABLE User_campaign_11 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

One by one finished.

ALTER TABLE User_campaign_12 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_13 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_14 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_15 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_16 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE USER_CAMPAIGN_17 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE USER_CAMPAIGN_18 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_19 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_20 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_21 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_22 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_23 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_24 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_25 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_26 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_27 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_28 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_29 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

ALTER TABLE user_campaign_30 Modify Current_stage mediumint (6) unsigned NOT null default 0 comment ' current checkpoint ';

Finished.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.