Student table
NO Name
1
2 B
3 c
4 d
Grade table
NO Grade
1 90
2 98
3 95
5 90
Inner join: The data corresponding to the search condition. No data is listed in no4.
Syntax: select * from student inner join grade on student. no = grade. no
Result:
NO Name NO Grade
1 a 1 90
2 B 2 98
3 c 3 95
Left join: All data in the left table, corresponding data in the right table
Syntax: select * from student left join grade on student. no = grade. no
Result:
NO Name NO Grade
1 a 1 90
2 B 2 98
3 c 3 95
4 D
Right join: All data in the right table, corresponding data in the left table
Syntax: select * from student right join grade on student. no = grade. no
Result:
NO Name NO Grade
1 a 1 90
2 B 2 98
3 c 3 95
5 90
Full connection
Syntax: select * from student full join grade on student. no = grade. no
Result:
No name grade
1 a 90
2 B 98
3 c 95
4 d
1 a 90
2 B 98
3 c 95
Note: you cannot directly use full join in access. You must use union all to merge the left and right connections.