I dont know why I am getting this error, I think this morning i ran this query without errors and it worked.. I am trying to merge two different tables into one table, the tables have the same fields, but different values.
I am using:
create table jos_properties_merged engine = MERGE UNION =
(mergecasas.jos_properties_contacts,viftestdb.buu_properties_contacts);
And i get
"#1113 - A table must have at least 1 column "
DO you know what I am doing wrong, please?
according to this link you need to specify the exact same columns existing in your 2 tables:
CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, message CHAR(20)) ENGINE=MyISAM;
CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, message CHAR(20)) ENGINE=MyISAM;
INSERT INTO t1 (message) VALUES ('Testing'),('table'),('t1'); mysql> INSERT INTO t2 (message) VALUES ('Testing'),('table'),('t2');
CREATE TABLE total ( -> a INT NOT NULL AUTO_INCREMENT, -> message CHAR(20), INDEX(a)) -> ENGINE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With