2009年8月12日 星期三

UNION VS UNIION ALL

Example: Table 1 : First,Second,Third,Fourth,FifthTable 2 : First,Second,Fifth,Sixth
Result Set:
UNION: First,Second,Third,Fourth,Fifth,Sixth (會移除重覆值)
UNION ALL: First,First,Second,Second,Third,Fourth,Fifth,Fifth,Sixth,Sixth (不會移除重覆值)

沒有留言:

張貼留言