Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autonumeric Field & Primary Key

Status
Not open for further replies.

astrodestino

IS-IT--Management
Feb 19, 2005
179
AR
Hi!
In access you can set a field to be autonumeric to use it like an ID & primary Key...
If I set a field like INT & Autonumeric & Primarykey how big can be the number? does it have a limit?
Tnx!
 
in access i think its 4 bytes, i.e. 2^32.
In SQL it would depend on the datatype you choose, i.e. int or bigint etc.


"I'm living so far beyond my income that we may almost be said to be living apart
 
Its Int.
What happens when i reaches the highest number?
Tnx!
 
unfortunately you get overflow errors

"I'm living so far beyond my income that we may almost be said to be living apart
 
Here are the ranges for each of the 4 int data types
bigint -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
int -2,147,483,648 to 2,147,483,647
smallint -32,768 to 32,767
tinyint 0 to 255


Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top