View of warning MySQL

When importing data in a MySQL database Wang often occur warnings that can easily be overlooked today, when suddenly want to see what the data warn of content, Baidu a moment to check the warning mysql command

show warnings;

Command is very simple, a view found a general warning like this

Warning | 1265 | Data truncated for column '刊名' at row 1265

Another is this

| Warning | 1366 | Incorrect string value: '\xB5\xDA\xB6\xFE\xBD\xEC...' for column '刊名' at row 1444 |

There is such a

| Warning | 1366 | Incorrect integer value: '' for column '工号' at row 13 |

Relatively rare

| Warning | 1262 | Row 11 was truncated; it contained more data than there were input columns |

 

mysql warning is still very easy to understand, with the warning message you want to modify the table is also very easy. Above warning, the third is to insert null data, if the field allows null values, these warnings can be ignored, the second character set data is wrong. For the second set of characters need to modify the database or data import txt encoding format.

The first warning is not enough field length, data is imported automatic cutting system, a fourth data import has a surplus.

Reproduced in: https: //www.cnblogs.com/kiwi/archive/2012/11/29/2794443.html

Guess you like

Origin blog.csdn.net/weixin_34007879/article/details/94125792