About 1,110,000 results
Open links in new tab
  1. sql - Join vs. sub-query - Stack Overflow

    Subqueries are generally used to return a single row as an atomic value, though they may be used to compare values against multiple rows with the IN keyword. They are allowed at nearly …

  2. sql - Is there a performance difference between CTE , Sub-Query ...

    Jun 23, 2012 · The performance of CTEs and subqueries should, in theory, be the same since both provide the same information to the query optimizer. One difference is that a CTE used …

  3. sql - SELECT with multiple subqueries to same table - Stack Overflow

    Oct 11, 2010 · SQL Server may be smart enough to optimize that, but I'm thinking not (I definitely need to get better at reading execution plans...). While there might be advantages to …

  4. sql - Which of the join and subquery queries would be faster and …

    I have serious doubt on this answer, since most DBMS, definitely SQL Server 2008 and later, translate the single ID subquery (not correlated, meaning: not referencing multiple outer query …

  5. sql - Difference between Subquery and Correlated Subquery

    Jun 24, 2013 · As a SQL student, what helped me understand the difference in a subquery and a correlated subquery is that there is usually a reference to both queries in the WHERE clause.

  6. When to use SQL sub-queries versus a standard join?

    Jan 25, 2011 · I am working on rewriting some poorly written SQL queries and they are over-utilizing sub-queries. I am looking for best-practices regarding the use of sub-queries. Any help …

  7. sql - What are "correlated" subqueries, and why is it that we …

    Feb 23, 2021 · The reason people give for avoiding correlated subqueries is that they are run once for every row in the outer query. If your outer query returns 100,000 rows then the …

  8. Update query using Subquery in Sql Server - Stack Overflow

    Update query using Subquery in Sql Server Asked 12 years, 10 months ago Modified 5 years, 10 months ago Viewed 440k times

  9. Nested select statement in SQL Server - Stack Overflow

    Check for more subquery rules and subquery types. More examples of Nested Subqueries. IN / NOT IN – This operator takes the output of the inner query after the inner query gets executed …

  10. SQL - Subquery in Aggregate Function - Stack Overflow

    0 I ran into a very similar problem with an Access subquery where the records were sorted by date. When I used the "Last" aggregate function I found it passed through all of the subqueries …