mysql数据库如何用一条语句同时查多个数据库

日期:2016-05-25 11:41:01 人气:2

mysql数据库如何用一条语句同时查多个数据库

1. 子查询方法select * from DB2.table2 where 字段 in (select table1中相应字段 from DB1.table1 where table1中相应字段=相应值) 2. 左连接方法select table2.* from DB2.table2 left join DB1.table1 on table1.字段 = table2.相应字段 where table2.相应字段 = 相应值; 2. 交叉连接方法select table2.* from DB2.tabl
    A+
热门评论