About 50 results
Open links in new tab
  1. sql - NOT IN vs NOT EXISTS - Stack Overflow

    Which of these queries is the faster? NOT EXISTS: SELECT ProductID, ProductName FROM Northwind..Products p WHERE NOT EXISTS ( SELECT 1 FROM Northwind..[Order Details] od …

  2. 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 called sub-query …

  3. 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 which can be …

  4. Real life example, when to use OUTER / CROSS APPLY in SQL

    179 I have been looking at CROSS / OUTER APPLY with a colleague and we're struggling to find real life examples of where to use them.

  5. How do I perform an IF...THEN in an SQL SELECT?

    Sep 15, 2008 · 117 You can find some nice examples in The Power of SQL CASE Statements, and I think the statement that you can use will be something like this (from 4guysfromrolla):

  6. sql - What are DDL and DML? - Stack Overflow

    Apr 5, 2010 · I have heard the terms DDL and DML in reference to databases, but I don't understand what they are. What are they and how do they relate to SQL?

  7. SQL Server: Examples of PIVOTing String data - Stack Overflow

    Trying to find some simple SQL Server PIVOT examples. Most of the examples that I have found involve counting or summing up numbers. I just want to pivot some string data. For example, I have a ...

  8. Using RegEx in SQL Server - Stack Overflow

    Jan 19, 2012 · On-prem Microsoft SQL Server will gain the same regex feature in the next major release ("vNext" as they say; so, that'll be SQL Server 2025 presumably). The new set of functions is …

  9. SQL 'LIKE' query using '%' where the search criteria contains

    May 29, 2012 · These examples deal specifically with escaping characters in Oracle. Let's say you wanted to search for a % or a _ character in the SQL LIKE condition. You can do this using an …

  10. What is the difference between INNER JOIN and OUTER JOIN?

    Sep 2, 2008 · Generally it is a good practice to try to use INNER JOIN instead of the different kind of joins. (Of course if it is possible considering the expected result set.) There are a couple of good …