跳到主要內容

Create relationship

CREATE RELATIONSHIPDirect Query 應用程式資料模型中指定新的表格和欄的關係。

CREATE RELATIONSHIP 只能用於 Direct Query 應用程式。這前面必須是 section directquery 區段。

語法:  

CREATE RELATIONSHIP (OUTER|INNER) JOINED] TableName, [(OUTER|INNER) JOINED] TableName ON ConditionExpression ;

資訊備註

若沒有指定表格的 outer|inner joined 限定詞,則預設將會是 inner joined

資訊備註

對於 TableName,您可以使用引用的名稱參考。例如 ( IDENTIFIER | LITERAL_STRING | LITERAL_FIELD | LITERAL_NUMBER))

範例:  

CREATE RELATIONSHIP BETWEEN T1,T2 ON A = C;
CREATE RELATIONSHIP
BETWEEN OUTER JOINED T2, INNER JOINED T3
ON (D = E or (D is null and E is null));

此頁面是否對您有幫助?

若您發現此頁面或其內容有任何問題——錯字、遺漏步驟或技術錯誤——請告知我們可以如何改善!