Logo 
Search:

Oracle Articles

Submit Article
Home » Articles » Oracle » Sub QueryRSS Feeds

USING EXISTS with CO-RELATED SUB-QUERIES

Posted By: Adalicia Fischer     Category: Oracle     Views: 2524

This article explains about USING EXISTS with CO-RELATED SUB-QUERIES with example.

Customer - orders - salespeople database

USING EXISTS with CO-RELATED SUB-QUERIES

Find salespeople who having multiple(more than 1 customers)

SELECT DISTINCT snum FROM Customers outer WHERE EXISTS (SELECT * FROM Customers inner 
WHERE inner.snum=outer.snum AND inner.cnum <> outer.cnum);
  
Share: 

 
 
 

Didn't find what you were looking for? Find more on USING EXISTS with CO-RELATED SUB-QUERIES Or get search suggestion and latest updates.

Adalicia Fischer
Adalicia Fischer author of USING EXISTS with CO-RELATED SUB-QUERIES is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!