One, connection query:
1. Internal connection
The maximum number of connection queries used, only the rows in the table that match the criteria are returned. Such as:
/*** Internal connection ***/select j_c.*,j_sc.* from course j_c INNER join SC j_sc on j_c.cno = J_sc. CNO;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/49/BF/wKioL1QZj53Q4GbiAAEoNHOov9U429.jpg "title=" Internal connection. png "alt=" wkiol1qzj53q4gbiaaeonhoov9u429.jpg "/>
2. Left Outer connection
Left OUTER join: Returns all rows in the left table, in addition to the rows that match the criteria.
/************************** left outer connection **/select j_c.*,j_sc.* from course j_c Ieft join SC j_sc on j_c.cno = J_sc. CNO;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/BF/wKioL1QZkEKibcLhAAH9EM-w5hg801.jpg "title=" Left outer connection. png "alt=" wkiol1qzkekibclhaah9em-w5hg801.jpg "/>
3. Right outer connection
Right OUTER join: Returns all rows in the right table, in addition to the rows that match the criteria.
/************************** right outer connection **/select j_c.*,j_sc.* from course j_c R join SC j_sc on j_c.cno = J_sc. CNO;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/BD/wKiom1QZkUHTlxEoAAFwxqJ2Atc312.jpg "title=" Right outer connection. png "alt=" wkiom1qzkuhtlxeoaafwxqj2atc312.jpg "/>
4. Full-Outer connection
Full outer joins: Returns rows that do not match the criteria in the left and right tables, in addition to and return rows that meet the criteria
/************************** full outer connection **/select j_c.*,j_sc.* from course j_c Complete join SC j_sc on j_c.cno = J_sc. CNO;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/49/BD/wKiom1QZkbrAluTuAAIzHjwFvGU295.jpg "title=" Full outer connection. png "alt=" wkiom1qzkbralutuaaizhjwfvgu295.jpg "/>
5. Cross-Connect
Cross connection: That is, the non-write connection condition or invalid connection condition forms the Cartesian product. (The default query)
/************************** Cross connect **/select j_c.*,j_sc.* from course J_c crosses join SC j_sc; Select j_c.*,j_sc.* from Course J_c, SC j_sc;
This article is from the "Skyarac" blog, make sure to keep this source http://skyarac.blog.51cto.com/5324985/1554529
Oracle Learning Path-sql-Join query