dbTalk Databases Forums  

distinct in union

comp.databases.oracle.server comp.databases.oracle.server


Discuss distinct in union in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michał Jabłoński
 
Posts: n/a

Default distinct in union - 10-06-2010 , 03:45 AM






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?

Reply With Quote
  #2  
Old   
Carlos
 
Posts: n/a

Default Re: distinct in union - 10-06-2010 , 04:10 AM






On Oct 6, 10:45*am, Michał Jabłoński <michal.jablo... (AT) gmail (DOT) com>
wrote:
Quote:
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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.