Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Oracle 9i PL/SQL outer join two tables

Posted on 2010-09-12
2
Medium Priority
?
599 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 74

Accepted Solution

by:
sdstuber earned 2000 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

WatchGuard Case Study: NCR

With business operations for thousands of customers largely depending on the internal systems they support, NCR can’t afford to waste time or money on security products that are anything less than exceptional. That’s why they chose WatchGuard.

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
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.
Via a live example, show how to take different types of Oracle backups using RMAN.
Suggested Courses

972 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