# Simple q: Confusion about exact datatype meaning

## Recommended Posts

Let's say i have a table:CREATE TABLE users (id INT UNSIGNED AUTO_INCREMENT)Due to the UNSIGNED option of the INT-datatype, the range of INT is 0 - 4294967295 (source: mysql manual).Now what i am confused about is, is that range the total number of rows the users-table can hold, or is '4294967295' the highest value the 'integer' column can hold?For example, will my users-table 'run out of space' when the table contains exactly 4294967295 rows? like so:-----id (this table contains 4294967295 rows)-----0123....4294967295-----Or will it 'run out' when there is a HUGE gap between 0 and 4294967295, like:-----id (this table contains 5 rows)-----01234294967295-----I'm sure this is a very simple question, but i've been looking the internet for a long time but found no question to this simple thing unfortunately .Much thank in advance!

Edited by Donotknow
##### Share on other sites

It is the highest value that can be stored in one cell in that column. The data type has no relationship to the number of rows. It is a kind of "instruction" that optimizes the database.

##### Share on other sites

Ooh i get it, thank you very much.So in theory, the number of rows a table may contain is infinite? For example:CREATE TABLE users (firstname CHAR(5))Since this table has no columns consisting of any numeric datatypes, it may practically contain unlimited rows?

##### Share on other sites

Ooh i get it, thank you very much.So in theory, the number of rows a table may contain is infinite? For example:CREATE TABLE users (firstname CHAR(5))Since this table has no columns consisting of any numeric datatypes, it may practically contain unlimited rows?
your table can expand as far it can grow. if you need more range in usrid column you can make it bigint Edited by birbal
##### Share on other sites

Okay, thank you both for your replies! My question is now completely answered.

##### Share on other sites

Tables can theoretically contain indefinite numbers of rows, however practically there are multiple engine, storage format and other limitations. For example, since MyISAM (a popular storage scheme for tables in MySQL) uses 32-bit pointers for the row locations, you can only store 4GB of data (sort of) before the table is "full".