|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello, this might seem like a really basic question but hopefully someone can answer it for me.
I have a tbl.photographs with several columns the first one is pictureID the type is INT and I use it as the primary key. it says 0-9999 now I'm wondering what happens when I get to 9999 is that it? or does it keep on going? I'm a bit worried should I change the type? Regards Jon |
|
#2
|
|||
|
|||
|
int will count up to a very large number, way above 9999 anyway
![]()
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
oh ok, so INT 0-9999 will go further then? I'm just worried if the insert will stop working when I get to pictureID 9999... will it go to 10,000 or blow up !
![]() |
|
#4
|
||||
|
||||
it definatly won't blow up, but if it does don't blame me... |
|
#5
|
|||
|
|||
|
Fingers crossed then I'm up to 8.5k in one table now.... I have been told on another forum that DOUBLE is a better solution, is that right?
Jon |
|
#6
|
||||
|
||||
|
yeah, thats right,
In old money an int was 32768(?)bits/bytes(I cant remember which...) which gives you a big number! and a double is 65536(?)bits( again can't remember!), I'm not sure if thats the same with SQL server2000, and in modern programming languages the int is a very big number that you'll probably never need, and thats the technical term for it! And no Microsoft doesn't employ me with my dodgy memory for bytes/bits! They're capable of making informed buffer over runs! |
|
#7
|
|||
|
|||
|
Double? this sounds like you are using MS Access, in wich case I would change to Long Integer.
|
|
#8
|
|||
|
|||
|
Sorry I read the manual INT is fine, I was getting confused with 'length' being 4 I thought that meant digits... no it's SQL
|
|
#9
|
|||
|
|||
|
Quote:
Yes, that 4 means it takes 4 bytes of internal storage, or 32 bits, which counts up into the millions or billions range. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Int? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|