创建跨不同数据库的视图
如果我有数据库D1和数据库D2,以及D1和表下的表,是否可以在MySQL数据库T1数据库D2下的>T2D2下创建T1的视图.如果是这样,你能告诉我语法吗?
If I have database D1 and database D2, and table T1 under database D1 and table T2 under database D2, is it possible to create a view of T1 under database D2 in MySQL. If so, can you show me the syntax.
两个数据库在同一台机器上.
Both the databases are on the same machine.
推荐答案
CREATE VIEW `D2`.`example` AS SELECT * FROM `D1`.`T1`;
相关文章