The updated or deleted row values cannot make the row unique or change multiple rows.

Source: Internet
Author: User

When I tried a table, I added several pieces of data to it. Later I found that the values of the fields originally intended as primary keys are "null". This is not acceptable. Delete the fields and try again. When you select Delete, the following error occurs: "The modified or deleted row value cannot be changed to a unique row, or multiple rows (x rows) have been changed.


It turns out that I forgot to add the primary key when creating the table, but now I cannot delete it. I can enter something in it, but I cannot enter it, and an error is returned. No way ~ Baidu ~ Various solutions finally found the methods that I can understand and operate on. (Good Method !!!)
Solution:
Click "new query" on the SQL toolbar, log on to the database where the data table to be modified is located, and enter the following SQL statement "delete database name. table name where field name to be deleted = 'field value'
For example:
Use jifang -- go to the jifang database go
Delete jifang. DBO. weihubiao where card number = 'null' </span>
Then press F5 to execute. Although the mistake was made carelessly, I learned something from the mistake and felt that it was worthwhile. If an error occurs, it is necessary to make progress ~ Come on !!!

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.