About 3,570,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] od …

  2. 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 '%' + @

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

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

  5. How to calculate percentage with a SQL statement

    Due to precedence of SQL statements it will be the same. however, due to data types if using 100 you can still get the result rounded to 0 decimals you desire for the % where as if you put it after the …

  6. sql - Exclude a column using SELECT * [except columnA] FROM tableA ...

    We all know that to select all columns from a table, we can use SELECT * FROM tableA Is there a way to exclude column(s) from a table without specifying all the columns? SELECT * [except columnA]...

  7. SQL- Ignore case while searching for a string - Stack Overflow

    Apr 18, 2013 · I have the following data in a Table PriceOrderShipped PriceOrderShippedInbound PriceOrderShippedOutbound In SQL I need to write a query which searches for a string in a table. …

  8. sql - What is the difference between JOIN and INNER JOIN ... - Stack ...

    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 different SQL …

  9. SQL - Select first 10 rows only? - Stack Overflow

    Dec 12, 2009 · How do I select only the first 10 results of a query? I would like to display only the first 10 results from the following query: SELECT a.names, COUNT(b.post_title) AS num FROM

  10. Format SQL in SQL Server Management Studio - Stack Overflow

    Feb 13, 2020 · Beginning with SQL Server Management Studio (SSMS) 18.7, Azure Data Studio is automatically installed alongside SSMS. Source Update: Actually Azure Data Studio is in some way …