Pages

Sunday, 7 October 2012

Venn diagram (Visual Representation) of SQL joins.


We all knows SQL joins are used to fetch data from different tables but if for fresher its very easy to understand types of JOINS by visually rather than queries. So today i am going to write article based on that so user can get idea easily.

Ø  LEFT OUTER JOIN: produces a complete set of records from Table A, with the matching records (where available) in Table B. If there is no match, the right side will contain null.
Ø  RIGHT OUTER JOIN: produces a complete set of records from Table B, with the matching records (where available) in Table A. If there is no match, the left side will contain null.
Ø  FULL OUTER JOIN: produces the set of all records in Table A and Table B, with matching records from both sides where available. If there is no match, the missing side will contain null.
Ø  INNER JOIN: produces only the set of records that match in both Table A and Table B.





4 comments:

  1. Wow !!
    Its easy to understand.
    Good.

    ReplyDelete
  2. Nice visual illustration of SQL joins. Its easy to understand with set theory. I've tried nested ones with venn diagrams as well. Found some great examples in the diagram community of Creately. Might be useful for programmers. You can find more ready to use (customizable) Venn diagram templates in the diagram community of Creately. You can use and try them for free.

    ReplyDelete