Hi everybody,
I don't understand waht does bigint(20)in MySql means.
First I thought bigint(20) means number from 0 to 99999999999999999999 digits, but I made a test with bigint(2). I thought bigint(2)=number from 0 to 99, but it's not.
Did you know anybody?
I'll be happy to know. Thank you :)

Recommended Answers

bigint value rang from -9,223,372,036,854,775,807 to 9,223,372,036,854,775,807.

bigint(20) isn't a digit limit. It just means that when the data is displayed, if it uses less than 20 digits it will be left-padded with zeros. 2^64 is the hard limit for the BIGINT type, and has 20 digits itself, hence …

Jump to Post

All 2 Replies

bigint value rang from -9,223,372,036,854,775,807 to 9,223,372,036,854,775,807.

bigint(20) isn't a digit limit. It just means that when the data is displayed, if it uses less than 20 digits it will be left-padded with zeros. 2^64 is the hard limit for the BIGINT type, and has 20 digits itself, hence bigint(20) just means everything less than 10^20 will be left-padded with spaces on display.

Int- 4 byte and big int- 8 byte integer
savings in database storage space is being claimed for Int type of field
if number of your database records do not go beyond 2.1 Billion rows.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.