【发布时间】:2026-02-06 00:10:01
【问题描述】:
我有两张桌子
t1:
+--------------+-------------+--------------+
| Product Name | Issue # | Risk Level |
+--------------+-------------+--------------+
| Product1 | Incident#45 | Risk Level 2 |
| Product2 | Incident#23 | Risk Level 3 |
| Product3 | Incident#98 | Risk Level 1 |
+--------------+-------------+--------------+
t2:
+----------+----------------+
| Org Code | Monthly Output |
+----------+----------------+
| 598 | 2000 |
| 412 | 100 |
| 598 | 2500 |
+----------+----------------+
我想将其组合为“外部连接”来创建:
+--------------+-------------+--------------+----------+----------------+
| Product Name | Issue # | Risk Level | Org Code | Monthly Output |
+--------------+-------------+--------------+----------+----------------+
| Product1 | Incident#45 | Risk Level 2 | (null) | (null) |
| Product2 | Incident#23 | Risk Level 3 | (null) | (null) |
| Product3 | Incident#98 | Risk Level 1 | (null) | (null) |
| (null) | (null) | (null) | 598 | 2000 |
| (null) | (null) | (null) | 412 | 100 |
| (null) | (null) | (null) | 598 | 2500 |
+--------------+-------------+--------------+----------+----------------+
t1 和 t2 没有类似的专栏可供我加入。有没有办法将这些表连接在一起?
【问题讨论】:
标签: sql oracle join full-outer-join