Sunday, September 29, 2013

DIFFERENCE BETWEEN "INSERT INTO" AND UNION IN SQL

In and of itself, "INSERT INTO" does not remove any duplicates. Typically, "DISTINCT", "GROUP BY" or "ROWNUMBER() .. = 1" is used to select unique rows.


One you have unique rows, it is up to you to determine what to do with them. If you want to store the unique rows, then you would be using "INSERT INTO" (or "SELECT .. INTO").






Gert-Jan


No comments:

Post a Comment