When one column of data is added to mysql, the error Datatruncatedforcolumn 'tg _ level' atrow1 is returned.

Source: Internet
Author: User
When mysql adds a new column of data, the error Datatruncatedforcolumn 'tg _ level' atrow1 is inserted with this column altertabletg_userchangetg_leveltg_leveltinyint (1) the error "Data truncated for column 'tg _ level' at row 1" is returned when unsignedno is added to mysql.
Insert the alter table tg_user change tg_level tinyint (1) unsigned not null column. Please help me

------ Solution --------------------
It's not update, it's add, so it's strange that the root cause is not found.

Discussion

Delete the original data in the database, because the original data is set to not null, which is in conflict.

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.