About 3,440,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 …

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

  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. 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. SELECT CAST( CASE WHEN Obsolete = 'N' or InStock = 'Y' THEN 1 ELSE 0 …

  5. Combining "LIKE" and "IN" for SQL Server - Stack Overflow

    Combining "LIKE" and "IN" for SQL Server [duplicate] Asked 15 years, 10 months ago Modified 1 year, 8 months ago Viewed 1.4m times

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

    FROM TableA This very powerful SQL syntax avoids a long list of columns that must be constantly updated due to table column name changes. This functionality is missing in the …

  7. sql - Incorrect syntax near '' - Stack Overflow

    I'm trying to run the following fairly simple query in SQL Server Management Studio: SELECT TOP 1000 * FROM master.sys.procedures as procs left join master.sys.parameters as params …

  8. SQL Server® 2016, 2017, 2019 and 2022 Express full download

    Jan 25, 2017 · All previous version of SQL Server Express were available in both web and full downloads. But I cannot find full download of SQL Server® 2016 Express. Does it exist? …

  9. sql server - Database stuck in "Restoring" state - Stack Overflow

    Ran into a similar issue while restoring the database using SQL server management studio and it got stuck into restoring mode. After several hours of issue tracking, the following query worked …

  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 …