[KLUG Programming] questions on picking data types

Adam Tauno Williams awilliam at whitemice.org
Wed Jul 14 23:17:28 EDT 2004


> > If not, then it probably makes more sense to just store the
> > 9-digit SSN as an INT.  That way when you need to retrieve a row
> > ...
> Ditto to everything Jamie said, with this note: isn't an int only -65535 to
> 65536 ?  Or is that called a smallint?  

Nope, smallint is (usally) -32767 ... 32767,  and unsigned small int is
0 ... 65535 - if we are talking about a 16 bit number.

An INT (usually) is a 32 bit number (sometimes called int4 - usually in
databases with a PC heritage),  value up to something like ~4 billion
unsigned.



More information about the Programming mailing list