内连接是只查询出连接条件的内容,普通的where a.name=b.name;
左连接就是(from table1,table2)以前面的表为主,
右连接是(from table1,table2)以后面的表为主,
全连接就是两边表的内容,不在where a.name=b.name条件下的也查询出;
内连接
select * from vote_user a,vote_action b where a.user_name=b.user_name;
左连接
select * from vote_user a,vote_action b where a.user_name=b.user_name(+);
右连接
select * from vote_user a,vote_action b where a.user_name(+)s=b.user_name;
全连接
select * from vote_user a,vote_action b where a.user_name=b.user_name(+)
union
select * from vote_user a,vote_action b where a.user_name(+)s=b.user_name;