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

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;
主站蜘蛛池模板: 灵石县| 石首市| 四平市| 古蔺县| 惠水县| 大兴区| 阜宁县| 九江市| 玉林市| 双辽市| 赞皇县| 大庆市| 望江县| 石楼县| 德清县| 台南市| 怀来县| 河北区| 克什克腾旗| 定南县| 炉霍县| 安宁市| 武义县| 永吉县| 蓬溪县| 白山市| 金昌市| 宜都市| 元阳县| 马鞍山市| 西丰县| 襄樊市| 宕昌县| 新余市| 固始县| 卢湾区| 明溪县| 永宁县| 睢宁县| 绥德县| 酉阳|