Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. Definition and Usage. The CASE statement goes through conditions and return a value when the first condition is met (like an IF-THEN-ELSE statement). So, once a condition is true, it will stop reading and return the result. If no conditions are true, it will return the value in the ELSE clause.

  2. www.mysqltutorial.org › mysql-control-flow-functions › mysql-case-functionMySQL CASE Expressions - MySQL Tutorial

    MySQL CASE expression is a control flow structure that allows you to add if-else logic to a query. Generally speaking, you can use the CASE expression anywhere that allows a valid expression e.g., SELECT, WHERE and ORDER BY clauses. The CASE expression has two forms: simple CASE and searched CASE.

  3. 1 sie 2016 · Understanding CASE WHEN: Example #1: Suppose, IF n < 0 THEN 'N is negative' else if n == 0 THEN 'N is Zero' else 'N is positive' Let's convert this if-else if chain in MySQL using CASE WHEN expression: SET @n := -9; SELECT CASE WHEN @n <0 THEN 'N is Negative' WHEN @n =0 THEN 'N is 0' ELSE 'N is positive' END AS output; Output:

  4. 16 sty 2024 · The CASE WHEN statement lets us make decisions on our data, categorizing and manipulating records based on specified conditions. Find out how to use CASE WHEN in this article. Imagine you're deciding what to wear for the day. You take out your umbrella if it's raining; if not, you leave it at home.

  5. 26 sty 2024 · The CASE-WHEN statement in MySQL 8 is a robust tool for building dynamic and responsive SQL queries. Varying from basic conditional output to more complex evaluations involving subqueries and joins, CASE-WHEN can help you derive nuanced insights from your data in an elegant fashion.

  6. CASE WHEN search_condition THEN statement_list [WHEN search_condition THEN statement_list] ... [ELSE statement_list ] END CASE The CASE statement for stored programs implements a complex conditional construct.

  7. CASE: The keyword that starts the CASE statement. WHEN condition THEN result: Evaluates the specified condition and returns the corresponding result if the condition is true. ELSE: An optional keyword that provides a default result if none of the preceding conditions are true.

  1. Ludzie szukają również