Home Forums SQL Server 2008 T-SQL (SS2K8) difference betwwn inner join and intersect in sql RE: difference betwwn inner join and intersect in sql

  • Inner join:

    1. It is a join statement

    2. It is used to display columns from all the tables involved based on the common columns present in them which matches a certain condition.

    3. Any of the columns among the tables can be used in select clause

    Intersect:

    1. It is a not a join statement

    2. It displays the values in the all columns included which are common in all the statements used in an intersect statement.

    3. It should include same number of columns with corresponding data type in all the statements.