MySQL The difference between BigInt and int is that INT is 32 bits long while BIGINT is 64 bits long.
Here are some key points -
BigInt occupies 8 bytes of storage space while int occupies 4 bytes of storage space.
int occupies the maximum value of 4294967295 for int(10) and 18,446,744,073,709,551,615 for bigint(20).
BigInt(20) and int(10), where 20 and 10 are available for zero-padded width display.
Here is a demo for Bigint and int with zero padding. Below is the query to create the table.
1 2 3 4 5 6 |
|
Now you can insert records into the table. The query is as follows -
1 2 |
|
Use the select statement to display all records in the table. The query is as follows -
1 |
|
The following is the output -
1 2 3 4 5 6 |
|
The above is the detailed content of MySQL BigInt Zerofill 与 int Zerofill?. For more information, please follow other related articles on the PHP Chinese website!