select * from employee_info;
select * from employee_pay;
-- 笛卡尔积
select a.*,b.* from employee_info a,employee_pay b;
-- 等值查询,结果为两表同时符合条件的记录,即交集
select a.*,b.* from employee_info a,employee_pay b where a.name=b.name;
-- 左连接 ,A表所有记录(包括不符合条件的记录),B表符合条件的记录
select a.*,b.* from employee_info a join employee_pay b on a.name=b.name;
-- 右连接,B表所有记录,A表符合条件的记录
select a.*,b.* from employee_info a right join employee_pay b on a.name=b.name;