Replace characters in SQL statements

Source: Internet
Author: User

I didn't want to tell you this because collecting others' websites is not a glorious thing, but I think this skill is really strong enough. If it weren't for this short line of code, I would not be exhausted. Yes. Some articles collected by others may be a collection program problem, the title of each article contains more than 2000 characters. As a result, after an HTML webpage is generated, many contents are not displayed, but more than records are displayed, I am not exhausted yet. So I consulted an SQL expert and sent me a line of SQL statements:

Update 'Article' set title = replace (title, ' ','');

I haven't seen anything after execution, but I checked the database. Wow !! It's really amazing. all of them are gone. I think this statement is really fierce, and I blame myself for having such a usage when I don't understand SQL, I will study SQL more in the future. I would like to share this experience with you. In addition, the report is no longer collected, just as honest as you are, and we look forward to a good harvest. By the way, the meaning of this line of code is as follows:

Update 'table name (for example, my article) 'set field name to be modified = replace (the Field name to be modified, 'replaced characters', 'replaced characters ')

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.