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

  • 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;
主站蜘蛛池模板: 白水县| 平安县| 清徐县| 四会市| 武陟县| 沁源县| 聂拉木县| 乌兰县| 炎陵县| 乡宁县| 湟中县| 江油市| 林甸县| 通道| 阳朔县| 通江县| 鹤壁市| 页游| 闸北区| 井冈山市| 通州市| 丽江市| 叶城县| 前郭尔| 博客| 武川县| 柘城县| 永兴县| 六枝特区| 舒兰市| 县级市| 神池县| 五大连池市| 清远市| 鄂伦春自治旗| 岳西县| 梁平县| 南康市| 岳普湖县| 宜阳县| 榆树市|