John, 

The number in the parenthsis tells mysql how to format the column when
it goes to display it..  Here is the relevant section of
http://www.mysql.com/doc/N/u/Numeric_types.html:

"Another extension is supported by MySQL for optionally specifying the
display width of an integral value in parentheses following the base
keyword for the type (for example, INT(4)). This optional width
specification is used to left-pad the display of values whose width is
less than the width specified for the column, but does not constrain the
range of values that can be stored in the column, nor the number of
digits that will be displayed for values whose width exceeds that
specified for the column. When used in conjunction with the optional
extension attribute ZEROFILL, the default padding of spaces is replaced
with zeroes. For example, for a column declared as INT(5) ZEROFILL, a
value of 4 is retrieved as 00004. Note that if you store larger values
than the display width in an integer column, you may experience problems
when MySQL generates temporary tables for some complicated joins, as in
these cases MySQL trusts that the data did fit into the original column
width."

Eric

> -----Original Message-----
> From: John D. Kirkpatrick [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 14, 2002 3:27 PM
> To: [EMAIL PROTECTED]
> Subject: Re: data type bigint(20) 
> 
> 
> MySQL Gurus,
> 
> I'm trying to figure out what the number after the type means 
> for numbers.
> I  noticed in someone's code that for the ID field they used 
> bigint(20).
> bigint I thought was fixed at 8 bytes. Does this override the size? 20
> bytes??? 20 bits?
> 
> Thanks
> John
> 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail 
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to