• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

inner / sub / inline query

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the diff between inner query / sub query / inline query
Regards,
aakash
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic