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

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:

主站蜘蛛池模板: 甘南县| 民乐县| 辉南县| 礼泉县| 嘉鱼县| 玉龙| 桐柏县| 丘北县| 海安县| 绥江县| 通州区| 平湖市| 宜良县| 河东区| 太仆寺旗| 城口县| 千阳县| 澄江县| 长宁区| 日照市| 武山县| 昌乐县| 白水县| 巧家县| 米林县| 花莲县| 玛纳斯县| 瑞丽市| 屏山县| 正阳县| 江西省| 灌南县| 台北县| 长阳| 泸州市| 锦州市| 比如县| 孙吴县| 德格县| 宁化县| 海原县|