What is the difference between UNION and UNION ALL?

后端 未结 26 2360
伪装坚强ぢ
伪装坚强ぢ 2020-11-21 11:28

What is the difference between UNION and UNION ALL?

26条回答
  •  余生分开走
    2020-11-21 12:15

    UNION and UNION ALL used to combine two or more query results.

    UNION command selects distinct and related information from two tables which will eliminates duplicate rows.

    On the other hand, UNION ALL command selects all the values from both the tables, which displays all rows.

提交回复
热议问题