About 1,310,000 results
Open links in new tab
  1. SQL "select where not in subquery" returns no results

    Sep 10, 2009 · The long answer (From T-SQL Fundamentals, Third edition, by Itzik Ben-Gan) This is an example: Imagine there is a order with a NULL orderid inside Sales.Orders table, so …

  2. sql - NOT IN vs NOT EXISTS - Stack Overflow

    The subquery inside the NOT IN statement can be evaluated at the beginning of the execution, and the temporary table can be checked against each value in the outer select, rather than re …

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

    Update query using Subquery in Sql Server Asked 12 years, 9 months ago Modified 5 years, 8 months ago Viewed 439k times

  4. Nested select statement in SQL Server - Stack Overflow

    We need to make an alias of the subquery because a query needs a table object which we will get from making an alias for the subquery. Conceptually, the subquery results are substituted into …

  5. SQL WITH clause example - Stack Overflow

    Sep 23, 2012 · The SQL WITH clause was introduced by Oracle in the Oracle 9i release 2 database. The SQL WITH clause allows you to give a sub-query block a name (a process also …

  6. sql - Difference between WITH clause and subquery? - Stack …

    May 6, 2015 · The WITH clause is for subquery factoring, also known as common table expressions or CTEs: The WITH query_name clause lets you assign a name to a subquery …

  7. sql - What is the difference between LATERAL JOIN and a …

    Things a subquery can't do There are things that a LATERAL join can do, but a (correlated) subquery cannot (easily). A correlated subquery can only return a single value, not multiple …

  8. sql - How can I insert values into a table, using a subquery with …

    How can I insert values into a table, using a subquery with more than one result? Asked 13 years, 8 months ago Modified 2 years, 1 month ago Viewed 281k times

  9. sql - Join vs. sub-query - Stack Overflow

    PostgreSQL can rewrite a subquery to a join or a join to a subquery when it thinks one is faster than the other. It all depends on the data, indexes, correlation, amount of data, query, etc.

  10. sql - Difference between Subquery and Correlated Subquery

    Jun 24, 2013 · A Correlated subquery is a subquery that is evaluated once for each row processed by the outer query or main query. Execute the Inner query based on the value …