Stored Procedure Data Type
Date: October 25, 2007 07:44PM
Please help me to understand the following: I would like to have my data (double type) to always to be 2 decimal places, what happens is that, inside the stored procedure the value is always set to 2.10 in the example show below i.e to 2 decimal places, but when I call the Stored procedure from my client it returns as 2.1 rather than 2.10 ,some times for value 5.00 it returns as 5 only. Please let me know what is the correct way to achieve this.
DROP PROCEDURE IF EXISTS `test`.`sp_decimal`$$
CREATE PROCEDURE `sp_decimal`(IN data1 double(10,2),OUT out1 double(10,2))
execute stored procedure as following:
The value expected is 2.10, but it returns 2.1.
Is this a bug ? I am using mysql 5.0.19,5.0.45 windows and linux.
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.