Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 1 lut 2010 · How do I update a table and set different values upon the condition evaluating to True. For instance : UPDATE Table SET A = '1' IF A > 0 AND A < 1 SET A = '2' IF A > 1 AND A < 2 WHERE A IS NOT NULL;

  2. 16 kwi 2016 · You cannot use the in operator to filter two different columns. For this example, you would have to use the standard logical operators:

  3. 20 gru 2023 · Using case would be an option : UPDATE some_table. SET mark_col_1_as_exported = CASE WHEN exp_col_1 = 1 THEN 0 ELSE mark_col_1_as_exported END , mark_col_2_as_exported = CASE WHEN exp_col_2 = 2 THEN 0 ELSE mark_col_2_as_exported END. WHERE exp_col_1=1 OR exp_col_2=2;

  4. 18 lut 2018 · It is possible to update rows based on some condition. It is also possible to update multiple tables in one statement in MySQL. Whether the latter is a good idea is debatable, though.

  5. 16 lut 2024 · We update multiple columns on multiple rows with different values using the CASE statement that goes through all conditions and outputs an item (value) when the first condition is satisfied (like the if-then-else statement).

  6. 8 kwi 2024 · In this article, we will learn how to update multiple columns in MySQL using UPDATE and SET commands. We will cover the syntax and examples, providing explanations to help you understand how to update multiple columns in SQL with a single query.

  7. 24 wrz 2018 · Yes, it is possible by using the inbuilt IF function in MySQL (https://dev.mysql.com/doc/refman/8.0/en/if.html). Query for your example would be: UPDATE myTable SET value = if(id=1, 25, value), price = if(pp_flag=8, 12, price)

  1. Ludzie szukają również