File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Inner Query Execution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Inner Query Execution" Watch "Inner Query Execution" New topic

Inner Query Execution

Guddu Ali
Ranch Hand

Joined: Jul 18, 2012
Posts: 39
select :name from (select empName from Employee);

Suppose the Inner query (select empName from Employee) gives one name 'XYZ'.

And as we know the Inner query and sub query execute first then why we not write directly

select :name from XYZ inplace of writing select :name from (select empName from Employee);
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33130

In this case you would. Inner queries should only be used when they are performing a task that can't be accomplished with a regular simple query.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Inner Query Execution
It's not a secret anymore!