SQL连接查询

左连接:参照等号左边的表,只要左表中存在就会显示

PL/SQL中的写法:

SELECT emp_name, dept_name FORM Employee, Department WHERE Employee.emp_deptid = Department.deptid(+)

 

 

右连接:参照等号右边的表,只要右表中存在就会显示

 

PL/SQL中的写法:

SELECT emp_name, dept_name FORM Employee, Department WHERE Employee.emp_deptid(+) = Department.deptid

 

 

注:在PL/SQL中,(+)所在位置的另一侧为连接方向。

 

 

其他可见:http://www.cnblogs.com/eflylab/archive/2007/06/25/794278.html

另:内连都不空,左连左不空,右连右不空,全连全可空(不可全空)http://yu-gao.blogspot.com/2008/09/blog-post.html

你可能感兴趣的:(html,sql,Blog)