要将两个查询条件的结果进行表关联

子查询进行关联

SELECT *
FROM (
    SELECT column1, column2
    FROM table1
    WHERE condition1
) AS subquery1
JOIN (
    SELECT column3, column4
    FROM table2
    WHERE condition2
) AS subquery2
ON subquery1.column1 = subquery2.column3;

你可能感兴趣的:(数据库,sql)