Page 1 of 1
large random number
Posted: Fri Oct 18, 2002 5:27 pm
by Zoram
How would i alter a table to insert a field that is a 32 digit number that is randomly generated and has to be 32 digits and is required?
Sorry for this amatuer question...

Posted: Fri Oct 18, 2002 5:39 pm
by volka
32-digits decimal?
I think there are only two numerical datatypes in mysql that can handle numbers of such magnitute (NUMERICAL==DOUBLE)
FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]
A small (single-precision) floating-point number. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38. If UNSIGNED is specified, negative values are disallowed. The M is the display width and D is the number of decimals. FLOAT without arguments or FLOAT(X) where X <= 24 stands for a single-precision floating-point number.
DOUBLE[(M,D)] [UNSIGNED] [ZEROFILL]
A normal-size (double-precision) floating-point number. Allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308. If UNSIGNED is specified, negative values are disallowed. The M is the display width and D is the number of decimals. DOUBLE without arguments or FLOAT(X) where 25 <= X <= 53 stands for a double-precision floating-point number.
Code: Select all
CREATE TABLE `...` (
...
`numField` float NOT NULL,
...
) TYPE=MyISAM;