Each type of extended data integer can be divided into unsigned and signed types (float and double are always signed). In data types other than char, integer variables declared by default are signed types; By default, Char is always unsigned. In data types other than char, if you need to declare unsigned types, you need to precede them. The difference between the unsigned version and the signed version is that the unsigned version can store twice as much positive integer data as the signed version. For example, in a 16 bit system, short can store data in the range of -32768~32767, and unsigned can store data in the range of 0~65535. Because in a computer, integers are stored in the form of complement. Depending on the highest order, if it is 1, the signed number is negative; If it is an unsigned number, it is interpreted as a positive number. In addition, if unsigned omits the last keyword, most compilers will think it is unsigned int.
Meaning in sql statement
Sql statement, when creating a data table.
User who created the table {user_id int unsigned}
Unsigned means that the data item user_id is always a positive integer.
For example, if the maximum tinyint is 127, then the maximum tinyintunsigned can reach 127 * 2.
The unsigned property is only for integers, and the binary property is only for char and varchar.