Database Thrilling Road = =

Source: Internet
Author: User

Small site, in the display of goods, the sister said similar items should be placed in the last row, otherwise this effect will occur

Here's this. Too happy to feel, similar to this has more than the repetition of the content, should be put to the end, so I think of this is by the self-increment of the primary key sort, delete the data and then re-inserted on the line, so handy to write the following code

Delete  from where  + < < ;

Row (s) affected;

What the fuck!!!!

I didn't specify the range!!!

Fortunately, I did a select operation before that. View ID range, as shown below:

Assiba, see this pit dad format don't want to say anything, directly stick to vim, see the data also have not saved, see the following scene, my heart slightly ann = =#

Sed awk hand in hand joy dripping, I rushed over to pull up the sed hand to break them up!

Unlimited Time Use

Sed s#,#,\ ' #123456789 filename

The database is finally restored to its original state, = = slightly abused, the database has no risk, the operation should be cautious.

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.