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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

int data type

Status
Not open for further replies.

apatelnz

ISP
Jul 25, 2001
3
0
0
NZ
I am creating a database (from a stnd script) and all my int datatypes are defaulting to lenght of 4. I don't want this as most of the int datatypes are keys.. hence 4 is too short.

The length of an int datatype cannot be specified in the script.

please help..

thanks
John
 

4 is not the actual number of digits. It is the number of bytes required for storage. The range of integer values is -2,147,483,648 to 2,147,483,647. Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
And if you're really concerned that even INT won't be large enough, SQLS 2000 has introduced BIGINT (8 bytes), which can range to the value 9,223,372,036,854,775,807. Use of BIGINT could introduce some complications, though, so don't automatically choose it without reason. Robert Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top