Home > database >  Mysql merge table, dynamically add table can be appended to the separately the total table
Mysql merge table, dynamically add table can be appended to the separately the total table

Time:11-15

I like the beginning, only t1, t2 two table
The CREATE TABLE t1 (a INT the NOT NULL AUTO_INCREMENT PRIMARY KEY, the message CHAR (20)) engine=myisam;

The CREATE TABLE t2 (a INT the NOT NULL AUTO_INCREMENT PRIMARY KEY, the message CHAR (20)) engine=myisam;

The CREATE TABLE total (a INT the NOT NULL AUTO_INCREMENT PRIMARY KEY, the message CHAR (20)) ENGINE=MERGE UNION=(t1, t2) INSERT_METHOD=LAST;

Data behind the t2 data of more than 1 million, I need to create winter t3 table appended to the total total table
ALTERTABLE total ENGINE=MERGE UNION=(t3) INSERT_METHOD=LAST;
Such written above is wrong, I want to know can be supplemented by t3 table, behind if you don't have one thousand tables, ten thousand tables will be very trouble

This is just a hypothesis, just want to know whether can be supplemented by t3 into total table

  • Related