Yahoo Αναζήτηση Διαδυκτίου

Αποτελέσματα Αναζήτησης

  1. 6 Οκτ 2012 · UPDATE `table` SET uid = CASE id WHEN 10 THEN 2952 WHEN 20 THEN 4925 WHEN 30 THEN 1592 END CASE WHERE id IN (10, 20, 30) or the simpler: UPDATE `table` SET uid = ELT(FIELD(id, 10, 20, 30), 2952, 4925, 1592) WHERE id IN (10, 20, 30) As FIELD() returns the index (position) of str in the str1, str2, str3, ... list. Returns 0 if str is not found.

  2. 6 Ιουν 2017 · You are familiar with the UPDATE statement; it changes or updates existing column values. If you want to update records based on column values, you can do it with the CASE expression. Look at the following example: UPDATE car SET info = CASE brand WHEN 'Ford' THEN 'Founder was Henry Ford' WHEN 'Toyota' THEN 'Founder was Kiichiro Toyoda' ELSE ...

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

    In this tutorial, you will learn how to use the MySQL CASE expression to add if-else logic to SELECT, WHERE, and ORDER BY of a query.

  4. The MySQL UPDATE Statement. The UPDATE statement is used to modify the existing records in a table. UPDATE Syntax. UPDATE table_name. SET column1 = value1, column2 = value2, ... WHERE condition; Note: Be careful when updating records in a table! Notice the . WHERE clause in the UPDATE statement.

  5. 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.

  6. 15.2.17 UPDATE Statement. UPDATE is a DML statement that modifies rows in a table. An UPDATE statement can start with a WITH clause to define common table expressions accessible within the UPDATE. See Section 15.2.20, “WITH (Common Table Expressions)”.

  7. 7 Μαρ 2024 · This tutorial explains what is MySQL CASE Statement, when to use it, how to use it with update statement, and when statement in programs: The MySQL CASE statement is a conditional construct and it returns values against a given condition being evaluated as true or false.

  1. Γίνεται επίσης αναζήτηση για