What is a subquery in Oracle?

          

What is a subquery in Oracle?

<<Previous  Next>>

Oracle - What is a subquery in Oracle? - June 27, 2009 at 11:00 AM

What is a subquery in Oracle?  

When a query needs to be run which has a condition that needs to be a result of another query then, the query in the condition part of the main one is called a sub-query. It is usually specified in the WHERE clause and is evaluated repeatedly on each row of the selection base table.

Eg:

select * from emp where hiredate < (select sysdate from dual);

This is just an example. The above query can be simply written as follows:

select * from emp where hiredate < sysdate;

Also read

Oracle correlated sub-queries

A query which uses values from the outer query is called as a correlated sub query. The subquery is executed once and uses the results for all the evaluations in the outer query.............

Oracle sub queries

Explain sub-queries in brief, What are the different operators used in building sub queries?, What are the guidelines for using SUB-QUERIES?, What is correlated sub-query?............

Oracle Synonym

Table references can be complicated. So oracle allows you create synonym for a complicated reference. It renames a table reference...........

<<Previous  Next>>



Write your comment - Share Knowledge and Experience


 

 
Interview questions
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring