- Learn T-SQL Querying
- Pedro Lopes Pam Lahoud
- 171字
- 2021-06-24 14:38:09
INNER JOIN
Inner joins compare the rows from two tables based on conditions specified in the query. Typically, this type of join would be used to intersect rows that have the same value in a specific column or set of columns. The only rows that would be returned are the ones that have matching rows in both tables, as represented in black in the following diagram:

For example, the AdventureWorks sample database has a Product table that contains the ProductID and Name columns and a ProductInventory table that contains the ProductID and Quantity columns. To write a query that returns the product name and the quantity together, an inner join can be used to combine rows from the Product table with rows from the ProductInventory table based on matching values in the ProductID column. In this case, only products that have rows in both tables will be returned. The query would look like the following:
SELECT Name AS ProductName, Quantity
FROM Production.Product
INNER JOIN Production.ProductInventory ON Product.ProductID = ProductInventory.ProductID;
- 虛擬儀器設計測控應用典型實例
- 輕松學C#
- 腦動力:C語言函數(shù)速查效率手冊
- 控制與決策系統(tǒng)仿真
- IoT Penetration Testing Cookbook
- 腦動力:PHP函數(shù)速查效率手冊
- 網(wǎng)上生活必備
- 快學Flash動畫百例
- Docker Quick Start Guide
- 基于多目標決策的數(shù)據(jù)挖掘方法評估與應用
- 傳感器與物聯(lián)網(wǎng)技術
- 計算機網(wǎng)絡安全
- 具比例時滯遞歸神經(jīng)網(wǎng)絡的穩(wěn)定性及其仿真與應用
- Splunk Operational Intelligence Cookbook
- 大數(shù)據(jù)案例精析