GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle
Go To First  |  Previous Question  |  Next Question 
 Oracle  |  Question 71 of 81    Print  
Multi Row Sub-Queries
Query 1.
SELECT sal FROM emp e WHERE sal < any (SELECT sal FROM emp
WHERE empno=e.mgr)
(o/p:11 row)

Query 2.
SELECT SAL FROM emp e WHERE sal < any (SELECT sal FROM emp
WHERE mgr=e.empno)
(o/p:1 row)

What is the difference between the above 2 queries.



  
Total Answers and Comments: 2 Last Update: August 27, 2009     Asked by: svp.kiran 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 30, 2008 04:20:17   #1  
todeepakmalhotra Member Since: September 2008   Contribution: 9    

RE: Multi Row Sub-Queries
These both are correlated subqueries.

In the first one we are knowing the salaries of employees who are earning less than there manager.


In the second one we are knowing about the salaries of managers who are earning less than their employees whom they manage.

 
Is this answer useful? Yes | No
August 27, 2009 04:53:41   #2  
sen_sam86 Member Since: June 2008   Contribution: 10    

RE: Multi Row Sub-Queries
how this query is possible i dont know how the emp number and manager number will be same i think the query in meaning less r am not understanding properly i dont know Let some one explain this...!
 
Is this answer useful? Yes | No

 Related Questions

Design a suitable database system for a bank along with 20 possible queries to the database (the quries should be such that their solution involves subquries or joins or both). Implement the database and the queries in a commercial DBMS using SQL
View Question | Asked by : manesh
Tags : DBMS

Query 1. SELECT sal FROM emp e WHERE sal < any (SELECT sal FROM empWHERE empno=e.mgr) (o/p:11 row) Query 2. SELECT SAL FROM emp e WHERE sal < any (SELECT sal FROM empWHERE mgr=e.empno) (o/p:1 
Latest Answer : how this query is possible i dont know, how the emp number and manager number will be same, i think the query in meaning less r am not understanding properly i dont know,,,, Let some one explain this...! ...


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

Getting Started with Oracle and ODP.NET

ODP NET Developer&rsquo; s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

PHP Oracle Web Development Review

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
 

Switched Multi Megabit Data Service (SMDS)

Switched Multi Megabit Data Service SMDS SMDS or Switched Multi Megabit Data Service is used to communicate on the Public Data Networks using the WAN networking technology The SMDS technology uses fiber or copper wires for networking There are many components in the SMDS networking environment that
 

Step by Step Oracle PL-SQL Tutorial

This introductory tutorial to PL SQL will help you to understand the basic concepts of PL SQL Please review the following tutorials and practice the sample SQL Statements on your local Oracle Database Please note that you must learn these basic things before we actually start getting in to Advanced
 

Working with XML in Oracle

Working with XML in Oracle Introduction to XML Extensive markup language is the language which presents data in a human readable form of text The data can be anything from a purchase order or a stock quote or weather radar or a flight schedule it can be represented using XML XML is very similar to H
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape