mysql实现跨库多表查询
数据库1 promotion_mmd ; 表 batch_modify ; 字段 nick 数据库2 promote; 表 customer ; 字段 nick
SELECT
COUNT(DISTINCT t1
.nick
)
FROM
promotion_mmd
.batch_modify t1
LEFT JOIN promote
.customer t2
ON t1
.nick
= t2
.nick
WHERE
t2
.dead_line
> now()
转载请注明原文地址:https://tech.qufami.com/read-4685.html