Nested Subquery vs Correlated Subquery

  • What is the difference between Nested Subquery and Correlated Subquery?

  • rinu.gour123 - Thursday, February 21, 2019 5:24 AM

    What is the difference between Nested Subquery and Correlated Subquery?

    Google this term: correlated subquery sql server example

    There are plenty of examples available, including a Microsoft Docs reference. If you have a question about one of the specific examples, feel free to post it here.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • One is a proper subset of the other.  Also, sub-queries are necessarily nested, so nobody uses the term nested.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Subquery inside another Subquery is called as Nested Subquery. On the off chance that the yield of a subquery is relying upon segment estimations of the parent inquiry table then the question is called Correlated Subquery.

    1. SELECT adminid(SELEC Firstname+' '+Lastname FROM Employee WHERE
    2. empid=emp. adminid)AS EmpAdminId FROM Employee;
  • rinu.gour123 - Thursday, February 21, 2019 5:24 AM

    What is the difference between Nested Subquery and Correlated Subquery?

    Hi Rinu,

    Coming to the forum is good . But even in this google era where you can get instant answer asking this questions !!!!
    Experts and MVP already knows the answer for it. First you should do  hard work and put the effort  then you can always find a way to do smarter.

    Saravanan

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply