Can MySql 5.0 views use tables that are located on another server? What is the syntax for creating such a view?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Federated Tables: http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html
This allows a table to be remotely accessed as if the remote table was a local table. It has its limitations but seems to meet my needs.
回答2:
Yes, you can create objects in one database that reference another database and even another host. The syntax to do so works something like this:
USE localhost.myDB;
SELECT * FROM host2.db.tableName;