About 16,400,000 results
Open links in new tab
  1. How do I make this SQL statement return empty strings instead …

    Mar 23, 2017 · You can use the COALESCE function to avoid getting nulls. Basically it returns the first non-null value from the list. This is an ANSI standard, though I have noticed that it isn't …

  2. Find Null or Empty Values in SQL - Baeldung

    Jun 6, 2024 · The COALESCE function in SQL returns the first non-NULL value from a list of arguments. COALESCE(code, ”) returns the value of the column code if it is not NULL . …

  3. How to return Null or value when nothing is returned from

    Oct 10, 2011 · I use the ISNULL () function for things of this nature. if the result is null, will replace it with '' (blank string). This assumes that the subquery returns no more than one row, which …

  4. SQL ISNULL(), NVL(), IFNULL() and COALESCE() Functions - W3Schools

    The SQL Server ISNULL() function lets you return an alternative value when an expression is NULL: SELECT ProductName, UnitPrice * (UnitsInStock + ISNULL(UnitsOnOrder, 0)) FROM …

  5. Working with Empty Values - SQL Server | Microsoft Learn

    Jan 27, 2025 · If both operands are empty, the numeric operator returns the empty cell value. When the empty cell value is an operand for the string concatenation operator (+), the empty …

  6. How to Filter for SQL Null or Empty String

    Nov 5, 2012 · In this video, I show you how to filter for SQL Null or Empty String in SQL Server 2012. I will also show you a trick to make it easier to filter for both.

  7. Replacing NULL and empty string within Select statement

    I have a column that can have either NULL or empty space (i.e. '') values. I would like to replace both of those values with a valid value like 'UNKNOWN' . The various solutions I have found …

  8. When to use NULL and when to use an empty string?

    Jan 4, 2011 · NULL means absence of value (i.e. there is no value), while empty string means there is a string value of zero length. For example, say you have a table to store a person' …

  9. SQL Server COALESCE Empty String | An Introduction - Bobcares

    Aug 28, 2023 · The COALESCE function in SQL Server is utilized to return the first non-null expression among its arguments. When dealing with empty strings (”) and null values, …

  10. Handling NULL and Empty Values in SQL Server - SQLNetHub

    Feb 9, 2009 · How can we handle empty string values? Unfortunately there is not a “magic” formula for that. The only suggestion is not to use empty strings but use NULL values instead …

  11. Some results have been removed
Refresh