keyword: 笛卡尔集Cartesian
写成xx.xx是为了性能
1. Select table1.column Select table2.column
FROM table1,table2
WHERE table1.column1 = table2.column2
2. Equal Join
Table 1 :EMPLOYEE
EMPLOYEE_ID DEPARTMENT_ID
200 10
201 20
202 30
DEPARTMENT_ID 是 Foreign Key
Table 2:DEPARTMENT
DEPARTMENT_ID DEPARTMENT_NAME
10 Admin
20 Market
30 IT
DEPARTMENT_ID 是主键
SELECT employees.employee_id,employees.last_name,
employees.department_id,departments.department_id,
departments.location_id
FROM employees,departments
WHERE employees.department_id = departments.departmetn_id;