search

Home  >  Q&A  >  body text

mysql optimization - how to prevent full table updates in mysql

MySQL has a safe mode, but sometimes in business, we need to update multiple rows of records, but we want to prevent all table fields from being updated.
I saw on the Internet that there is a way to prevent the entire table from being updated through triggers. How should I write it?

世界只因有你世界只因有你2751 days ago919

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-18 10:57:07

    I don’t quite understand the question. What do you mean by safe mode? Do you mean that only updates with where conditions are allowed after sql_safe_updates is turned on? If this is turned on, it will be enough to prevent misoperations from updating the relevant fields of the entire table. . Also, does preventing all table fields from being updated prevent multiple rows of records you want to update, or what?

    reply
    0
  • Cancelreply