List:General Discussion« Previous MessageNext Message »
From:Daniel Kasak Date:December 15 2003 3:12am
Subject:Re: integer not being inserted correctly
View as plain text  
David Griffiths wrote:

>If an INT has a fixed range, then what is the point of giving it scale? As
>in, "int(12)".
>
>In Oracle, a NUMBER(12) indicates how many digits you could have (in this
>case, 99999999999 would be the max value).
>
>Would an int(2) allow -99 to 99, or -2147483648 to 2147483647?
>
>Maybe MySQL should throw an error if someone tries to create an int(xyz)
>column that exceeds the size of an int?
>
>David.
>  
>
We use the 'scale' ( or whatever it is ... the thing in brackets ) to 
indicate to MySQL what size fields are in a fixed-width import.
See http://www.mysql.com/doc/en/LOAD_DATA.html ... look a bit more than 
half-way down for 'fixed-row'.

-- 
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@stripped
website: http://www.nusconsulting.com.au

Thread
integer not being inserted correctlyA Pasetti15 Dec
  • Re: integer not being inserted correctlyDan Nelson15 Dec
  • Re: integer not being inserted correctlyPaul DuBois15 Dec
  • Re: integer not being inserted correctlyDavid Griffiths15 Dec
    • Re: integer not being inserted correctlyDaniel Kasak15 Dec
    • Re: integer not being inserted correctlyPaul DuBois15 Dec
    • RE: integer not being inserted correctlyMike Brando15 Dec
RE: integer not being inserted correctlyCharles E Sweet15 Dec