permaculture playing cards*
The moose likes Oracle/OAS and the fly likes inner / sub / inline query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "inner / sub / inline query" Watch "inner / sub / inline query" New topic
Author

inner / sub / inline query

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
What is the diff between inner query / sub query / inline query
Regards,
aakash
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

I might get this wrong, but a subquery is usually in the From clause, and an inline query is in the Select portion of a query. Haven't heard something be called an inner query though.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
yogesh sood
Ranch Hand

Joined: Aug 31, 2000
Posts: 108
hi there,
Lets start with Inline View or rather inline query...
take a look at example:-
/*
Select ename,sal from (select ename,sal from emp order by) where rownum < 5.
*/
here after from there is no table name it is the result of query that is being used this is called inline view or inline query.
anyone can throw some light on Sub queries not sure im confident in that


If its green its biology if its stinkks its chemistry if it has numbers it is Maths and if it doesn't work its TECHNOLOGY
Rudy Dakota
Ranch Hand

Joined: Jul 27, 2002
Posts: 54
Hi there,
A subquery as I know it is part of the where clause. A simple example:

As might be obvious most, if not all, subqueries can be reformulated to be simply joins (rather obvious in this example). That is also what a decent optimizer would do.
Subqueries do have a use in keeping your SQL readable, certainly when the statements get more complex, I 'd say.
Good riddance,
Rudy.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: inner / sub / inline query
 
Similar Threads
Top N Analysis
nested sql queries using JSP - pls help
Group by desc in jpql
Collections creating inner classes
Error ORA-00937