About 38,800,000 results
Open links in new tab
  1. Should I use != or <> for not equal in T-SQL? - Stack Overflow

    Yes; Microsoft themselves recommend using <> over != specifically for ANSI compliance, e.g. in Microsoft Press training kit for 70-461 exam, "Querying Microsoft SQL Server", they say "As an …

  2. sql - Not equal <> != operator on NULL - Stack Overflow

    Apr 14, 2011 · 11 In SQL, anything you evaluate / compute with NULL results into UNKNOWN This is why SELECT * FROM MyTable WHERE MyColumn != NULL or SELECT * FROM MyTable …

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

  4. sql - Concatenate text from multiple rows into a single text string ...

    Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this into a single string of Peter, Paul, Mary?

  5. sql - Copy data into another table - Stack Overflow

    How to copy/append data from one table into another table with same schema in SQL Server? Edit: let's say there is a query select * into table1 from table2 where 1=1 which creates table1 wi...

  6. How to set variable from a SQL query? - Stack Overflow

    Apr 7, 2025 · I'm trying to set a variable from a SQL query: declare @ModelID uniqueidentifer Select @ModelID = select modelid from models where areaid = 'South Coast' Obviously I'm not …

  7. How to see query history in SQL Server Management Studio

    Is the query history stored in some log files? If yes, can you tell me how to find their location? If not, can you give me any advice on how to see it?

  8. sql - Update a table with data from another table - Stack Overflow

    Muhd 25.8k 22 66 79 2 possible duplicate of sql update query with data from another table – p.campbell Aug 11, 2011 at 18:07 2

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

  10. SQL to find the number of distinct values in a column

    Apr 5, 2019 · SQL to find the number of distinct values in a column Asked 17 years, 3 months ago Modified 2 years, 9 months ago Viewed 826k times