SQL question, DISTINCT returned values in multiple UNION ALL'ed statements -


I have a SQL statement that is a union of many queries that return everything:

  select key as select key from the table where XYZ union selects all the keys from the table as the DISTINCT id where the XYZ union all ... My question is that there are some questions that the key comes back overlap , And I really want the last key field to be different Bring back the looking values Any ideas? 

Use UNION instead of UNION ALL.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -