another math question

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
can probably be answered by a database guru...

how many possible records if your unique id is a bigint (8)
 

sao123

Lifer
May 27, 2002
12,653
205
106
on my compiler, int is a 2 byte data, which contains values from -32767 to 32767

bigint which is the equivolent of long is a 4 byte data it has possible values from
-2,147,483,647 to 2,147,483,647

worth pointing out is that if you use unsigned int or unsigned long, you can double your possible value, because in a database application, you dont need to have negative numbers.

unsigned int = 65536
unsigned long = 4,294,967,296
 

ZoomStop

Senior member
Oct 10, 2005
841
0
76
Originally posted by: sao123
on my compiler, int is a 2 byte data, which contains values from -32767 to 32767

bigint which is the equivolent of long is a 4 byte data it has possible values from
-2,147,483,647 to 2,147,483,647

worth pointing out is that if you use unsigned int or unsigned long, you can double your possible value, because in a database application, you dont need to have negative numbers.

unsigned int = 65536
unsigned long = 4,294,967,296

 

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
Originally posted by: sao123
on my compiler, int is a 2 byte data, which contains values from -32767 to 32767

bigint which is the equivolent of long is a 4 byte data it has possible values from
-2,147,483,647 to 2,147,483,647

worth pointing out is that if you use unsigned int or unsigned long, you can double your possible value, because in a database application, you dont need to have negative numbers.

unsigned int = 65536
unsigned long = 4,294,967,296

weird, in ms sql, int is for like 9 billion and bigint is for like 900 trillion.... hmmm
 

MageXX9

Senior member
Jan 25, 2005
442
0
0
Not sure what compiler you guys are using but I'm almost positive an integer is 32 bits, 4 bytes, everywhere.
 

thehstrybean

Diamond Member
Oct 25, 2004
5,727
1
0
Holy crap. I was expecting something easy. You guys are freakin genius' (or geniui, whatever)...