Posted on 2011-03-18
Last Modified: 2012-05-11
I have two tables


Both tables have column names COMPANYACCNO

I need the output of those COMPANYACCNO which exists in BOTH COMPANY and INTEROFFNOTE
Question by:GRChandrashekar
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
LVL 74

Accepted Solution

sdstuber earned 500 total points
ID: 35170391
select companyaccno from company
select companyaccno from interoffnote
LVL 74

Expert Comment

ID: 35170393
or try...

select companyaccno from company
where companyaccno in (
select companyaccno from interoffnote)

or ...

select companyaccno from company
where exists (select null  from interoffnote where company.companyaccno  = interoffnote.companyaccno )

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
UTL_FILE invalid file operation 5 60
plsql job on oracle 18 111
Oracle Errors 11 90
Oracle perfomance issue. 4 51
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ā€¦
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example, show how to take different types of Oracle backups using RMAN.

710 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