By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,694 Members | 2,121 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,694 IT Pros & Developers. It's quick & easy.

non-duplicate data from 2 seperate tables help

P: 2
I need to get all of the non-duplicate data out of 2 tables (ci and hi)
i can't seem to work it out
i think i need to use the minus command but that will only display the data for 1 table
can anyone help
Mar 5 '08 #1
Share this Question
Share on Google+
3 Replies


amitpatel66
Expert 100+
P: 2,367
I need to get all of the non-duplicate data out of 2 tables (ci and hi)
i can't seem to work it out
i think i need to use the minus command but that will only display the data for 1 table
can anyone help
Could you please post what you have tried so far?
Mar 5 '08 #2

P: 2
select
from ci
minus
select
from hi;
so far ive tried that but it only shows the data from ci and not hi like i want it to
Mar 5 '08 #3

amitpatel66
Expert 100+
P: 2,367
select
from ci
minus
select
from hi;
so far ive tried that but it only shows the data from ci and not hi like i want it to
Try this:

Expand|Select|Wrap|Line Numbers
  1.  
  2. select * from ci
  3. UNION
  4. select * from hi
  5.  
  6.  
Mar 5 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.