Furniture database error

MasterJiq

Member
Jul 8, 2016
385
23
Hello,

It was the first time I used navicat, so how do I solve this problem ?
qigrOqT.png


1265 - Data truncated for column 'is_rare' at row 1 ? what's this meaning, why the problem occurred
How do I solve ? with sql or other method.

Thanks
 
@Core @SpreedBlood @Altercationz
 

MayoMayn

BestDev
Oct 18, 2016
1,423
683
@Altercationz sorry if this was the noob question, how do I make the size bigger ? with sql ? Thanks.
Code:
 ALTER TABLE `furniture` MODIFY COLUMN `is_rare` bigint(50);

If its a string, just do varchar(255)

And if you're going to modify a primary auto increment column do it like this:
Code:
 ALTER TABLE `furniture` MODIFY COLUMN `is_rare` int(11) NOT NULL AUTO_INCREMENT; 
PRIMARY KEY(`is_rare`);

I'd recommend to use MySQL Workbench, its cleaner and way better than Navicat.

Sent from my SM-G928F using Tapatalk
 
Last edited:

Joe

Well-Known Member
Jun 10, 2012
4,092
1,920
Your SQL mode is set to strict, I'm on my phone right now but I've had this problem before. You can disable strict mode by removing a line in the MySQL folder and restarting MySQL. Look around Google as I don't have access to any resources right now.
 

MayoMayn

BestDev
Oct 18, 2016
1,423
683
Your SQL mode is set to strict, I'm on my phone right now but I've had this problem before. You can disable strict mode by removing a line in the MySQL folder and restarting MySQL. Look around Google as I don't have access to any resources right now.
You mean sql safe updates? That would show a whole different error.
Any other time if that happens, simply run this query:
Code:
SET SQL_SAFE_UPDATES = 0

Strict mode, global mode, etc whatever you're trying to help him with, is just an irrelevant solution that isn't correct.
Truncated data, is because the value getting inserted doesn't match the parameters set for the specific column.
 

Joe

Well-Known Member
Jun 10, 2012
4,092
1,920
You mean sql safe updates? That would show a whole different error.
Any other time if that happens, simply run this query:
Code:
SET SQL_SAFE_UPDATES = 0

Strict mode, global mode, etc whatever you're trying to help him with, is just an irrelevant solution that isn't correct.
Truncated data, is because the value getting inserted doesn't match the parameters set for the specific column.
Just suggesting something that helped me, your way is probably the proper way, however I just disabled strict mode.
 

Users who are viewing this thread

Top