Yahoo Search Búsqueda en la Web

Resultado de búsqueda

  1. Technical Details. More Examples. Example. Return 5 if the condition is TRUE, or 10 if the condition is FALSE: SELECT IF(500<1000, 5, 10); Try it Yourself » Example. Test whether two strings are the same and return "YES" if they are, or "NO" if not: SELECT IF(STRCMP ("hello","bye") = 0, "YES", "NO"); Try it Yourself » Example.

    • Try It Yourself

      MySQL Database: Restore Database Get your own SQL server SQL...

  2. 15 de dic. de 2012 · IF () in MySQL is a ternary function, not a control structure -- if the condition in the first argument is true, it returns the second argument; otherwise, it returns the third argument. There is no corresponding ELSEIF () function or END IF keyword.

  3. SELECT IF(TRUE,'PRIMERO','SEGUNDO'); devuelve 'PRIMERO' SELECT IF(FALSE,'PRIMERO','SEGUNDO'); devuelve 'SEGUNDO' Así es que para mostrar el origen de datos evalúa si zona.nombre es NULL. Si lo es, entonces evalúa si direccion.nombre es NULL.

  4. The IF statement for stored programs implements a basic conditional construct. Note. There is also an IF() function, which differs from the IF statement described here. See Section 14.5, “Flow Control Functions”. The IF statement can have THEN, ELSE, and ELSEIF clauses, and it is terminated with END IF .

  5. www.mysqltutorial.org › mysql-stored-procedure › mysql-if-statementMySQL IF Statement

    CREATE PROCEDURE GetCustomerLevel( IN pCustomerNumber INT, . OUT pCustomerLevel VARCHAR ( 20 )) BEGIN DECLARE credit DECIMAL ( 10, 2) DEFAULT 0 ; SELECT creditLimit . INTO credit. FROM customers. WHERE customerNumber = pCustomerNumber; IF credit > 50000 THEN. SET pCustomerLevel = 'PLATINUM' ; END IF ; END $$

  6. Cómo utilizar la sentencia IF en MySQL. La sentencia IF en MySQL se utiliza para realizar una evaluación condicional dentro de las consultas SQL. La sintaxis básica de la sentencia IF es la siguiente: «`sql. SELECT columna1, columna2, IF (condicion, valor_si_verdadero, valor_si_falso) AS nuevo_nombre. FROM tabla;

  7. 20 de ene. de 2022 · La sintaxis de la declaración IF en MySQL se puede dar como SELECT IF(condition, result_when_true, result_when_false) AS [col_name]. En particular, la declaración IF, la condición es el criterio definido por el programador que necesita ser evaluado. Puede tener una o más columnas involucradas para su consideración.