Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Int(5) what does 5 represent? 1

Status
Not open for further replies.

sazebac

Technical User
Apr 16, 2003
117
US
Does the 5 represent a number that can be 5 digits long from -99999 to 99999, or a number that can have any number of combinations that is 5 digits long? as in 12345, 54321 etc?
 
The number after the numeric datatype is only the display width of the number.

The datatype itself specifies the maximum range of possible number


TINYINT 1byte -128 127
SMALLINT 2bytes -32768 32767
MEDIUMINT 3bytes -8388608 8388607
INT 4bytes -2147483648 2147483647
BIGINT 8bytes -9223372036854775808 9223372036854775807


The `unsigned` option will avoid negative values.


Bye


Qatqat

I have been happy throughout my life in thinking that samba was I kind of dance; now I live with Linux and all I do is working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top