On 27-Apr-2004 Paul DuBois wrote:
> At 13:29 -0400 4/27/04, Keith C. Ivey wrote:
>>On 27 Apr 2004 at 13:59, Ronan Lucio wrote:
>>
>>> OK, I understood it, but I didn�t understand why is there an
>>> option
>>> TINYINT(n)
>>
>>See http://dev.mysql.com/doc/mysql/en/Numeric_types.html
>>
>>| Another extension is supported by MySQL for optionally
>>| specifying the display width of an integer value in
>>| parentheses following the base keyword for the type (for
>>| example, INT(4)). This optional display width specification
>>| is used to left-pad the display of values having a width
>>| less than the width specified for the column. However, the
>>| display width does not constrain the range of values that
>>| can be stored in the column, or the number of digits that
>>| will be displayed for values having a width exceeding that
>>| specified for the column.
>>
>>I haven't found much use for display widths myself, but then
>>different people use MySQL differently.
>
> I agree. I cannot think of a time when I've actually specified
> a display width, except just to see what effect it has on result
> display. :-)
>
The only time I've used it is in a billing app (w/ zerofill):
CREATE TABLE invoice (
id mediumint(6) unsigned zerofill NOT NULL auto_increment,
idcust mediumint(5) unsigned zerofill NOT NULL,
...
);
You can make some pretty decent reports with a shell script if the DB
lends a hand with formatting.
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]