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

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;
主站蜘蛛池模板: 宁化县| 杨浦区| 淳化县| 三江| 阿克苏市| 阜城县| 启东市| 武强县| 临海市| 双辽市| 景洪市| 桓台县| 涿鹿县| 元阳县| 全南县| 陇川县| 安泽县| 连州市| 忻州市| 吉首市| 巴马| 屏东县| 荆门市| 安塞县| 留坝县| 宜君县| 合水县| 铁力市| 平山县| 新蔡县| 宣恩县| 二连浩特市| 湖北省| 东平县| 阳信县| 连城县| 莲花县| 和龙市| 孟连| 冕宁县| 黔江区|