我想參加下表LINQ的嵌套的內部聯接
1. B_Book[1st Table]
-B_BID (Book ID)(PK)
-B_Name
-B_CategroyID (FK)
2. BI_BookInstance [2nd Table]
-BI_IID(Instance ID)
-BI_BID (FK)
-BI_Price
3. BC_BookCategory [3rd Table]
-BC_CategoryID (PK)
-BC_CategoryName
首先加入B_Book和BI_BookInstance再加入這些都與BookCategory的結果。 (1日加入)[B_BID等於BI_BID] (第二嵌套加入)[1的結果加入B_CategoryID等於BC_CategoryID]
編輯
SQL會像下面這樣:
SELECT * FROM
(SELECT * FROM B_Book b JOIN BI_BookInstance bi on b.B_BID = bi.BI_BID) as t1
JOIN BC_BookCategoryID bc on bc.BC_CategoryID = t1.B_CategoryID