Friday, 28 February 2014

Mysql Union vs Inner Join?

Inner Join:
Inner Join is used to get the set of records that matches with in both the joined tables.


Union:
Union is used to get the Set of rows one of the other from multiple tables.
or
Union is used to get the Set of rows from a single table all as a single result set.

Union is having certain Rules like,

  • The number and the order of columns should be same in all queries.
  • The datatypes must be compatible.
  • The Columns separated in the different select statements should be in same order.



No comments:

Post a Comment

Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.