About 3,420,000 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] …

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

    Sep 15, 2008 · The CASE statement is the closest to IF in SQL and is supported on all versions of SQL Server.

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

  4. sql - What is the difference between JOIN and INNER JOIN

    SELECT * FROM table INNER JOIN otherTable ON table.ID = otherTable.FK Is there any difference between the statements in performance or otherwise? Does it differ between …

  5. sql - Adding an identity to an existing column - Stack Overflow

    Jun 26, 2009 · Here's the trick: you can use SQL Server's ALTER TABLE...SWITCH statement to change the schema of a table without changing the data, meaning you can replace a table …

  6. sql - Can I use multiple "with"? - Stack Overflow

    Nov 24, 2015 · sql t-sql sql-server-2008 edited Dec 13, 2019 at 22:35 Esteban Verbel 748 3 20 40

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

    Sep 2, 2008 · What is the difference between INNER JOIN and OUTER JOIN? How do LEFT OUTER JOIN, RIGHT OUTER JOIN, and FULL OUTER JOIN fit in?

  8. sql - UPDATE and REPLACE part of a string - Stack Overflow

    Jun 28, 2013 · I've got a table with two columns, ID and Value. I want to change a part of some strings in the second column. Example of Table: ID Value ...

  9. SQL SELECT WHERE field contains words - Stack Overflow

    Jan 12, 2013 · SQL SELECT WHERE field contains words Asked 12 years, 11 months ago Modified 7 months ago Viewed 4.9m times

  10. SQL WHERE.. IN clause multiple columns - Stack Overflow

    SELECT * FROM table1 WHERE (CM_PLAN_ID, Individual_ID) IN ( SELECT CM_PLAN_ID, Individual_ID FROM CRM_VCM_CURRENT_LEAD_STATUS WHERE Lead_Key = …