Is because 7 is the size of the record, and 4 is the size of the "decimals"
Decimal(7,4) can allocate only 999.9999
If you want to allocate 1468 then you must declare as decimal(8,4) to 4
"decimals" and 4 "integers" in version 5 is the same as oracle
The first parameter is the total number size(including decimals) and the
second how many elements will use from the number size...
Do I explain correctly???
To allocate: 10000.0000 the row must be: decimal(9,4)
PD, and I don't know why in version 5 changed this feature
:: ISC Edwin Cruz Garcia ::
IT Factory Systems - Systems Department
Texas Instruments de Mexico
(449)9105194 Direct Line
(449) 9105100 Switchboard, Ext. 5194
(449) 9105124 Fax
From: shantanu oak [mailto:shantanu.oak@stripped]
Sent: Monday, July 18, 2005 12:18 PM
Subject: Different versions differnet results
I am getting two different results for the same set of commands on two
different versions of MySQL.
Can anyone explain what the issue is?
CREATE TABLE `testdecimal` (
`rate` decimal(7,4) NOT NULL default '0.0000'
INSERT INTO testdecimal SET rate=1468;
select * from testdecimal;
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=1