Yahoo Search Búsqueda en la Web

Resultado de búsqueda

  1. 17 de dic. de 2018 · Is there an equivalent function in MySQL ? mysql. coalesce. nvl. edited Dec 17, 2018 at 21:09. codeforester. 41.4k 19 115 149. asked Aug 30, 2011 at 6:33. user833129. 2 Answers. Sorted by: 52. Use coalesce: select coalesce(column_name, 'NULL VALUE') from the_table. edited Dec 17, 2018 at 21:11. codeforester. 41.4k 19 115 149.

  2. 4 de ago. de 2011 · Para resolver estas cuestiones, en Oracle existe la función NVL (elemento, reemplazo) que básicamente hace lo siguiente: si el elemento es igual a NULL, en la salida saca la cadena “reemplazo”. En MySQL la función tiene otro nombre: IFNULL y su referencia en MySQL es la siguiente: IFNULL(expr1,expr2)

  3. 4 de ago. de 2009 · 3 Answers. Sorted by: 10. Use COALESCE, it's much more simple: DELIMITER $$ CREATE FUNCTION NVL (first DATETIME, second DATETIME) RETURNS DATETIME. BEGIN. RETURN COALESCE(first, second); END. $$

  4. Solutions. MySQL. The MySQL IFNULL() function lets you return an alternative value if an expression is NULL: SELECT ProductName, UnitPrice * (UnitsInStock + IFNULL (UnitsOnOrder, 0)) FROM Products; or we can use the COALESCE() function, like this: SELECT ProductName, UnitPrice * (UnitsInStock + COALESCE(UnitsOnOrder, 0)) FROM Products; SQL Server.

  5. In Oracle, the NVL function allows you to replace NULL with the specified expression i.e. it returns the first operand if it is not NULL, otherwise it returns the second operand. In MySQL you have to use IFNULL function. Oracle: -- Replace NULL SELECT NVL ('John', 'N/A') FROM dual; # John -- Replace NULL SELECT NVL (NULL, 'N/A') FROM dual; # N/A.

  6. 30 de sept. de 2022 · Cambiar el valor nulo por texto usando tipo la función de "nvl" en MySQL - Stack Overflow en español. Formulada hace 1 año y 4 meses. Modificada hace 1 año y 4 meses. Vista 591 veces. 0. Tengo una base llamada "base" que tiene una tabla llamada "Programa" en MySQL, estoy trabajando en MySQL Workbench.

  7. 31 de may. de 2018 · Fortunately there are several ways to do this in MySQL. Here are four: The IFNULL() function. The COALESCE() function. The IF() function combined with the IS NULL (or IS NOT NULL) operator. The CASE expression combined with the IS NULL (or IS NOT NULL) operator. Examples of these options are below. Sample Data. First, let’s grab some sample data: