Thanks Ingo,
>> MERGE is not an option in table creation.
>> In contrast to a view, the MERGE table cannot be expressed by a SELECT command
Well, I meant use of table creation + select as it says in documentation....
CREATE TABLE total (
-> a INT NOT NULL AUTO_INCREMENT,
-> message CHAR(20), INDEX(a))
-> ENGINE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST
After creating the MERGE table, you can issue queries that operate on the group of tables as a whole:
mysql> SELECT * FROM total;
The system I access is MySQL 4.0.20-standard
Ok the documentation page
http://dev.mysql.com/doc/refman/4.1/en/merge-storage-engine.html
doesnt have such clear examples, and only 1 comment
and not seen much more elsewhere.
I did try to create a table like 'total' above, cutting out primary keys etc of original tables as per instruction but it doesn't work.
It's not a big thing, I'll get it eventually but was hoping for some simple examples of creation and use
On a general note,
I don't think it's possible with just 1 database server request
to access 2 (equivalent) day tables (as above) with a program table using UNION and JOIN, or any other way ?