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

  • MySQL 8 for Big Data
  • Shabbir Challawala Jaydip Lakhatariya Chintan Mehta Kandarp Patel
  • 74字
  • 2021-08-20 10:06:14

RIGHT JOIN

RIGHT JOIN fetches all records from the right and common records from the left table. If we use the customer and order table example with right join, it will fetch all records from the customer table even if there are no matches in the left table (order). To fetch all customer details with order, the following query can be used:

SELECT order.order_id, customer.name
FROM order
RIGHT JOIN customer ON order.customer_id = customer.customer_id;
主站蜘蛛池模板: 邯郸市| 万全县| 从化市| 裕民县| 杂多县| 太仆寺旗| 南阳市| 崇礼县| 白玉县| 铅山县| 河曲县| 应城市| 花莲市| 谷城县| 津南区| 瑞丽市| 河北区| 清新县| 通化市| 乐陵市| 炎陵县| 黔西县| 全州县| 榆中县| 盐池县| 吐鲁番市| 昌平区| 海兴县| 托里县| 那曲县| 桃源县| 通江县| 鹤壁市| 页游| 博乐市| 广丰县| 油尖旺区| 彭山县| 钟祥市| 黔东| 楚雄市|