MySQL Forums
Forum List  »  Quality Assurance

Re: Regarding Error code : 1406 : Data Truncation : Data too long for column
Posted by: Vivek Kumar Sharma
Date: August 18, 2020 12:45AM

drop table if exists tbl;

CREATE TABLE `tbl` (
`id` int DEFAULT NULL,
`full_name` varchar(50) DEFAULT NULL,
`Charlen` int DEFAULT NULL
);
insert into tbl(id,full_name,Charlen)
select
us.id,
us.full_name as full_name,
char_length(us.full_name) as ln
from <fedrated table name> as us where id>=516 and id<520;

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.