Solved

Oracle 9i PL/SQL outer join two tables

Posted on 2010-09-12
2
588 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
2 Comments
 
LVL 73

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle RAC 12c 8 72
Query to identify changes between rows of two tables 8 47
ORA-00923: FROM keyword not found where expected 3 64
2012 r2 branch office DNS 2 35
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Secure VPN Connection terminated locally by the Client.  Reason 442: Failed to enable Virtual Adapter. If you receive this error on Windows 8 or Windows 8.1 while trying to connect with the Cisco VPN Client then the solution is a simple registry f…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

777 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