Solved

Oracle 9i PL/SQL outer join two tables

Posted on 2010-09-12
2
594 Views
Last Modified: 2013-12-19
I have two tables which has identical table definition, one table has a few addtional records.  I need to see those additional records.  The "left join" statement doesn't work in Oracle, and putting (+) in condition column doesn't return the right result for me neither.  They have quite a few columns as well, so if there is a way I don't need to type all the columns name in will be even better.

e.g.
TableA
-------------------
col1   col2   col3
-------------------
 1       11       A
 2       11       B
 3       12       C
 
TableB
-------------------
col1   col2   col3
-------------------
 1       11       A
 2       11       B
 3       12       C
 4       12       D

The results should gives me TableB the last record.  Please help.  Thanks.
0
Comment
Question by:cmleung2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 500 total points
ID: 33656740
so, you only want

4   12   D  to be returned?

if so, try this...

select * from tableB
minus
select * from tableA
0
 
LVL 1

Author Closing Comment

by:cmleung2
ID: 33656797
That works.  Thanks.
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Let’s list some of the technologies that enable smooth teleworking. 
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to recover a database from a user managed backup
Suggested Courses

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question