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 -

delphi - Mouseover hint for TChart series value -

How to Create Master-Details view using Asp.Net MVC framework -