# Outer

明確的 Join 前置詞可接在前置詞 outer 之後，以指定 outer join。在 outer join 中，會在兩個表格間產生所有組合。產生的表格會因此包含原始資料表格中的欄位值組合，其中一或兩個表格會呈現連結欄位值。

outer 關鍵字是選用項目，是未指定聯結前置詞時使用的預設連結。

語法：

Outer Join [ (tablename) ](loadstatement |selectstatement )

引數：

表格載入引數

| 引數 | 描述 |
| --- | --- |
| tablename | 要與載入的表格進行比較的具名表格。 |
| loadstatement 或 selectstatement | 用於載入表格的 LOAD 或 SELECT 陳述式。 |

範例：

Example 1A

| Table1 | - |
| --- | --- |
| A | B |
| 1 | aa |
| 2 | cc |
| 3 | ee |

Example 1B

| Table2 | - |
| --- | --- |
| A | C |
| 1 | xx |
| 4 | yy |

`SQL SELECT  * 
 from table1;` `join SQL SELECT 
* from table2;`

OR

`SQL SELECT * 
 from table1;` `outer join 
 SQL SELECT * from table2;`

範例 1C

| Joined table | - | - |
| --- | --- | --- |
| A | B | C |
| 1 | aa | xx |
| 2 | cc | - |
| 3 | ee | - |
| 4 | - | yy |

## 瞭解更多資訊

* [Join](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Join.htm)
* [Inner](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Inner.htm)
* [Left](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Left.htm)