Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须在 mysql 的派生表上执行一个自连接的 sql 语句。派生表涉及一个毛茸茸的子查询,我想知道是否有任何替代方法可以实际编写和执行它两次-
SELECT a.* FROM (my hairy subquery) AS a LEFT JOIN (my hairy subquery) AS a2 ON a.groupname = a2.groupname etc..
对此的标准解决方案是使用 CTE,但 MySQL 尚不支持这些。替代方案是:
有关的