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
  • 2
LVL 73

Accepted Solution

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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…
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 videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

947 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now