Re: distinct in union

From: Carlos <miotromailcarlos_at_netscape.net>
Date: Wed, 6 Oct 2010 02:10:42 -0700 (PDT)
Message-ID: <2059b274-c3cd-43a7-99bb-77a22b10caf9_at_n3g2000yqb.googlegroups.com>



On Oct 6, 10:45 am, Michał Jabłoński <michal.jablo..._at_gmail.com> wrote:
> The following query:
> select a_id,b, c from table1
> union all
> select a2_id,b2,c2 from table2
>
> gives me a result:
>
> 1,2,3
> 2,2,3
>
> but I want only values from second table. What is the most efficient
> way to do that?

Query the second table ONLY?

WTF! Cheers.

Carlos. Received on Wed Oct 06 2010 - 04:10:42 CDT

Original text of this message