MySQL returns an error when concatenating strings and Num types. mysqlnum

Source: Internet
Author: User

MySQL returns an error when concatenating strings and Num types. mysqlnum

Problems Found

The image address is as follows:

Http://qximg.lightplan.cc/2016/09/11/1473574486942944.jpeg

The effect to be achieved is to add the size, as shown in the following figure.

Http://qximg.lightplan.cc/2016/09/11/1473574486942944.jpeg | 1200*675

Take it for granted at first

UPDATE tag_group SET cover = cover + '| 1200*675 'where id = 1;

Result Error

Data truncation: Truncated incorrect DOUBLE value: 'http: // qximg. lightplan. cc/2016/09/11/1473574486942944 .jpeg'

It indicates that an incorrect value is intercepted.

Solution

We recommend that you use String concatenation when querying information.ConcatFunction concatenation

UPDATE tag_group SET cover = concat (cover, '| 1200*675') WHERE id = 1;

Summary

The above is all the content of this article. We have learned that the solution to this problem is very simple. I hope the content of this article will help you in your study or work, if you have any questions, you can leave a message.

Related Article

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.