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

SQL JOINS

Join is used to retrieve data from multiple tables. For example, if there are two tables, order and customer, and we want to retrieve data, it is possible using the JOIN clause.

The different types of JOIN are as follows:

  • INNER JOIN: Returns only those records which have matching values in both tables.
  • CROSS JOIN: Returns only those records which are have matching values in either the left or right table.
  • LEFT JOIN: This will returns all records from the left table and only matching records from the right table.
  • RIGHT JOIN: This will returns all records from the right table and only matching records from the left table.

The following figure illustrates the example that we looked at briefly:

主站蜘蛛池模板: 仲巴县| 奎屯市| 张家川| 衡阳县| 孟津县| 洛阳市| 秦皇岛市| 成武县| 塔河县| 镶黄旗| 吉林市| 唐山市| 礼泉县| 南乐县| 兴和县| 时尚| 龙门县| 双城市| 揭东县| 新绛县| 牟定县| 睢宁县| 盈江县| 连云港市| 梁河县| 彩票| 余江县| 江川县| 汾西县| 鸡东县| 长武县| 五指山市| 广西| 石楼县| 额尔古纳市| 奎屯市| 仁布县| 岑巩县| 府谷县| 色达县| 监利县|