文件名称:笛卡尔乘积的产生-复杂查询技术-连接
文件大小:671KB
文件格式:PPT
更新时间:2024-05-15 15:58:09
sql
笛卡尔乘积的产生 EMP (20 行) DEPT (8 rows) … … * 笛卡尔乘积: 20x8=160 行 Cartesian Products (continued) A Cartesian product is generated if a join condition is omitted. The example on the slide displays employee last name and department name from the EMPLOYEES and DEPARTMENTS tables. Because no WHERE clause has been specified, all rows (20 rows) from the EMPLOYEES table are joined with all rows (8 rows) in the DEPARTMENTS table, thereby generating 160 rows in the output. SELECT last_name, department_name dept_name FROM employees, departments; Instructor Note Demo: 4_cart.sql Purpose: To illustrate executing a Cartesian product …