MySQL Modify and delete permission settings

Source: Internet
Author: User

SET sql_safe_updates = 0;

Update and delete operations will be performed smoothly

SET sql_safe_updates = 1; ( safe update mode)

In the update operation: The update is rejected when the Where Condition (column) has no index available and no limit restriction. Updates are rejected when the where condition is constant and there is no limit restriction.

In a delete operation: when the Where condition is a constant, or if the where condition is null, or if the column in the Where Condition has no index available and no limit restriction, the deletion is rejected.

It is important to note that:

In an update operation, where can be a constant, where the column (columns) can have no index. However, limit restrictions are required.

However, delete must be strict: where cannot be a constant, and the column in the Where condition cannot be indexed!

MySQL Modify and delete permission settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.