August 22, 2009

Joins in Mysql

Joins in Mysql,

INNER JOIN - only rows satisfying selection criteria from both joined tables are selected.

LEFT OUTER JOIN - rows satisfying selection criteria from both joined tables are selected as well as all remaining rows from left joined table are being kept along with Nulls instead of actual right joined table values.

RIGHT OUTER JOIN - rows satisfying selection criteria from both joined tables are selected as well as all remaining rows from right joined table are being kept along with Nulls instead of actual left joined table values.

FULL OUTER JOIN - rows satisfying selection criteria from both joined tables are selected as well as all remaining rows both from left joined table and right joined table are being kept along with Nulls instead of values from other table.


Reference : http://www.gplivna.eu/papers/sql_join_types.htm

No comments:

Post a Comment