官术网_书友最值得收藏!

INNER JOIN

This join returns records matching in both tables and returns relevant records. For example, the Order table used in any Ecommerce applications:


For example, the Customer table used in ecommerce application which consists Customer data:


The following query would fetch all order records with customer details. As the customer IDs 37 and 77 are not present in the customer table, it will fetch only the matching rows excluding customer IDs 37 and 77:

SELECT order.order_id, customer.name
FROM order
INNER JOIN customer ON order.customer_id = customer.customer_id;
主站蜘蛛池模板: 子长县| 宝丰县| 平原县| 正蓝旗| 斗六市| 历史| 黄石市| 社旗县| 洛南县| 南宁市| 香港| 崇义县| 富阳市| 靖安县| 嘉兴市| 宝兴县| 东兰县| 焉耆| 军事| 社会| 崇文区| 安塞县| 湖南省| 广丰县| 临安市| 镇雄县| 蓝山县| 韶山市| 北宁市| 白朗县| 西贡区| 巴东县| 绥阳县| 宾川县| 桐梓县| 平和县| 古蔺县| 左贡县| 个旧市| 乌兰浩特市| 河东区|