Purushottam Rathore
What is the differences between UNION & JOINS in sql server?
By Purushottam Rathore in .NET on Nov 03 2010
  • Purushottam Rathore
    Nov, 2010 3

    A 'Union selects rows' and Join 'selects columns from 2 or more tables'.

    • 1
  • Shiv kumar
    Apr, 2014 21

    JOIN: A Join is used for displaying columns with the same or different names from different tables. The output displayed will have all the columns shown individually. i.e. The columns will be aligned next to each other. UNION: The UNION set operator is used for combining data from two tables which have columns with the same datatype. When a UNION is performed the data from both tables will be collected in a single column having the same datatype.

    • 0
  • Dipanshu Kumar Rana
    Mar, 2013 30

    A join selects columns from 2 or more tables. A union selects rows

    • 0
  • Harshit Vyas
    Nov, 2010 15

    joins is used in our query
    like,
    SELECT column_name(s)
    FROM table_name1
    INNER JOIN table_name2
    ON table_name1.column_name=table_name2.column_name

    and union is used to merge the result of two query

    like,

    select * from table1
    union
    select * from table2

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS