About 9,000,000 results
Open links in new tab
  1. SQL conditional SELECT with possible NULL - Stack Overflow

    Jul 20, 2012 · IFNULL () is what I use every day in MySQL. You could also use the coalesce () function and do it this way. if the first value is null it will go to the second value. If both values …

  2. SQL - conditional ISNULL statement in a query - Stack Overflow

    Apr 1, 2019 · But, if the NumberofRecords count for a given result record = 1, then it should check whether the c.Text field is NULL or blank. If it is NULL or Blank, the TextFieldHasData field …

  3. SQL ignore part of WHERE if parameter is null - Stack Overflow

    Jul 25, 2013 · The COALESCE function in SQL returns the first non-NULL expression among its arguments. Here for example if the @param1 is equal to null the function will return col1 which …

  4. ISNULL (Transact-SQL) - SQL Server | Microsoft Learn

    Sep 3, 2024 · The following example uses ISNULL to replace a NULL value for Color, with the string None.

  5. SQL ISNULL Function Examples - SQL Server Tips

    Mar 18, 2021 · Using the ISNULL () function we could write the following query which will update any row in the Product table that has a NULL value in the Color column to an empty string.

  6. SQL Server ISNULL () Function - W3Schools

    Definition and Usage The ISNULL () function returns a specified value if the expression is NULL. If the expression is NOT NULL, this function returns the expression. Syntax

  7. sql server 2012 - Conditional WHERE Clause in a Table Valued Function ...

    Apr 23, 2013 · AND ( @Location IS NULL OR (@Location IS NOT NULL AND Location = @Location)) AND ( @Device IS NULL OR (@Device IS NOT NULL AND Device = @Device )) …

  8. sql server - Is there a way to make a null check on a variable in a ...

    Aug 26, 2016 · One way is to use dynamic SQL, using a null check to optionally add that part of the where clause. set @vc_dynamicsql = @vc_dynamicsql + ' and myTable.Id = …

  9. Null vs. Empty Values in SQL Server — Queries and Techniques

    Dec 19, 2024 · To manage this effectively, users need reliable methods to identify both NULL and empty column values. This guide explores the built-in tools available in SQL Server, including …

  10. Different ways to handle NULLs in SQL Server - LinkedIn

    Mar 9, 2021 · 1) Using ISNULL () function - TSQL specific function. 2) Using COALESCE () function - ANSI SQL standard function. 3) Using a CASE statement. ISNULL () is a TSQL …

  11. Some results have been removed
Refresh