加入不相关的 table 与不相等的行

Join unrelated table with unequal rows

我想加入 Table A、Table B 和 Table C 作为附加图像中的预期结果。

您可以枚举行并将其用于连接。 . .这可能是你想要的:

select ab.*, c.*
from (select a.*, b.*,   -- really list out the columns you want
             row_number() over (order by accountid) as seqnum
      from a join
           b
           on a.accountid = b.accountid
     ) ab join
     (select c.*, row_number() over (order by code) as seqnum
      from c
     ) c
     on ab.seqnum = c.seqnum