MySQL INT code example

Example 1: unsigned int in mysql

id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT

Example 2: mysql biginteger size

For MySQL database:
In BIGINT(8), the number 8 represents how the data will be displayed. It does not affect the storage. The number is used to display width.

BIGINT takes 8 bytes i.e. 64 bits. The signed range is -9223372036854775808 to 9223372036854775807 and unsigned range takes positive value. The range of unsigned is 0 to 18446744073709551615.

Example 3: what is int in mysql

INT stands for interger, so it is interger values.
INT can contain zero, positive and negetive values.
INT cannot contain fraction values, only hole numbers are excepted.

Tags:

Sql Example