主要问题和问题本身是:100
上下文:
我知道在MySQL中不能有两个级别深的关联子查询,但使用派生表似乎可以、is this normal or is there something I don't know或 does this 2 level thing only and STRICTLY affect correlated subqueries?
SELECT table3.field1, table3.field2, (SELECT table1.field1 FROM table1 WHERE table1.a = table3.field2) AS calculated,
(SELECT COUNT(*) FROM (SELECT * FROM table2 WHERE table2.c = table3.field2) AS derived) AS calculated2
FROM table3;