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. How do I perform an IF...THEN in an SQL SELECT?

    Sep 15, 2008 · 116 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):

  3. SQL WITH clause example - Stack Overflow

    Sep 23, 2012 · 353 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 …

  4. 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 …

  5. LEFT JOIN vs. LEFT OUTER JOIN in SQL Server - Stack Overflow

    Jan 2, 2009 · Left Join and Left Outer Join are one and the same. The former is the shorthand for the latter. The same can be said about the Right Join and Right Outer Join relationship. The …

  6. 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 …

  7. 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 …

  8. SQL: IF clause within WHERE clause - Stack Overflow

    Sep 18, 2008 · Is it possible to use an IF clause within a WHERE clause in MS SQL? Example: WHERE IF IsNumeric(@OrderNumber) = 1 OrderNumber = @OrderNumber ELSE OrderNumber LIKE '%' + @

  9. sql - Insert into ... values ( SELECT ... FROM ... ) - Stack Overflow

    Aug 25, 2008 · Is there a silver-bullet syntax coming from an SQL standard (for example, SQL-92) that would allow me to insert the values without worrying about the underlying database?

  10. SQL Server query to find all permissions/access for all users in a ...

    Aug 13, 2011 · I would like to write a query on a sql 2008 that will report all the users that have access to a specific database, or objects within the database such as tables, views, and stored procedures, either