Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 IDENTITY Column: Int or BigInt?

Author  Topic 

RoLYroLLs
Constraint Violating Yak Guru

255 Posts

Posted - 2004-07-31 : 17:08:46
Altho Int has a huge max value of 2,147,483,647... should one be acustomed to using bigint as the identity of a column instead of int? I'm used to using int, but when the db goes into production, I'm not sure of the amount of records that will accumulate within, let's say a month, 6 months or even a year. i don't want to have to come back and edit many tables and sprocs when I learn that I should have used bigint as the identity column instead of int. Let's say I use bigint for the tables I would expect, but not totally sure, would surpass the int datatype, and later find out it is a waste of storage using bigint for one particular table, then design to change it to int. Would it be better to go from bigint to int, or from int to bigint, and why one and not the other?

Thanks again to all!

- RoLY roLLs

Kristen
Test

22859 Posts

Posted - 2004-07-31 : 17:30:05
Adding one row a second would take until 2072

10 rows a second would take until 2011

Start at minus 2,147,483,647 to double that ...

Kristen
Go to Top of Page

RoLYroLLs
Constraint Violating Yak Guru

255 Posts

Posted - 2004-07-31 : 17:50:16
ha, thanks again kristen! easy as that! I'm sure I'll get there by the year 5634

- RoLY roLLs
Go to Top of Page
   

- Advertisement -