From the description of the MERGE
table type in the MySQL documentation at https://dev.mysql.com/doc/refman/5.0/en/merge-storage-engine.html it appears this is similar to creating a view that uses a UNION
statement to connect multiple tables, either from a single database or multiple databases.
In Microsoft SQL Server (which admittedly is not open-source), you could do something like this:
CREATE VIEW MergedTablesView
AS
SELECT Field1, Field2, Field3, ...
FROM Database1.dbo.Table1
UNION
SELECT Field1, Field2, Field3, ...
FROM Database1.dbo.Table2
UNION
SELECT Field1, Field2, Field3, ...
FROM Database1.dbo.Table3
...
The UNION
statement will remove duplicate rows from the result set, which seems to be your primary requirement.
I'm certain other database engines, including PostgreSQL, also implement the UNION
keyword in a very similar manner. Here is the PostgreSQL Manual on the UNION
statement.
MERGE
was MySQL's early attempt at partitioning, so won't exist anywhere else. It's one of a kind (and should be put to rest)...imho – Derek Downey Apr 19 at 1:33