Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. SELECT item_code, IF(category_code = 'HERR1', 'NO', IF(category_code = 'COLN5', 1, 2)) AS category_code, item_name, item_quantity FROM qa_items. Then the first if will fail and the nested if will evaluate. edited Jul 24, 2012 at 10:00. answered Mar 10, 2012 at 17:30.

  2. 1 cze 2022 · There are two types of IFs in MySQL: the IF statement and the IF function. Both are different from each other. In this article, we will explain their diversities and show usage examples. Also, we will review other MySQL functions.

  3. Example. Return "YES" if the condition is TRUE, or "NO" if the condition is FALSE: SELECT IF(500<1000, "YES", "NO"); Try it Yourself » Definition and Usage. The IF () function returns a value if a condition is TRUE, or another value if a condition is FALSE. Syntax. IF (condition, value_if_true, value_if_false) Parameter Values. Technical Details.

  4. www.mysqltutorial.org › mysql-stored-procedure › mysql-if-statementMySQL IF Statement - MySQL Tutorial

    Summary. Use IF...THEN statement to conditionally execute a block of statements based on the evaluation of a specified condition. Use IF...THEN...ELSE statement to execute a block of statements if a specified condition is true and an alternative block of statements if the condition is false.

  5. 21 sie 2024 · The IF-THEN statement in SQL is used to execute a block of code if a specified condition is true. If the condition evaluates to true, the code within the THEN block is executed. If the condition is false, the block is skipped. Syntax: IF condition THEN. statements; END IF; Parameters Used:

  6. www.mysqltutorial.org › mysql-control-flow-functions › mysql-if-functionMySQL IF Function - MySQL Tutorial

    MySQL IF function Examples. Let’s practice with several examples to see how the MySQL IF function works. A simple IF function example. You can use the IF function directly in the SELECT statement without the FROM and other clauses as follows: SELECT IF (1 = 2, 'true', 'false'); -- false Code language: SQL (Structured Query Language) (sql) Try ...

  7. 11 lip 2024 · IF (..., 'true', 'false'): The first argument is the result of the subquery ('true' in this case). The second argument ('true') is the value to return if the first argument (the subquery result) is true. The third argument ('false') is the value to return if the first argument (the subquery result) is false.

  1. Ludzie szukają również