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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting garbage when I insert value in column type double on mysql

Status
Not open for further replies.

roman987

Programmer
Aug 28, 2000
5
US
hi, I am creating a table with column rate type double
then i inserted value into that table, and the result that came out from
that query was garbage. Not the one I inserted.
Can any one help me. Here is my code

mysql>create table roman(type double(16,4));

mysql> insert into roman values(16.4);
Query OK, 1 row affected (0.02 sec)

mysql> select * from roman ;
+-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----------------------------------+
| rate

|
+-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----------------------------------+
| 190359826455422719014202781144712880322016387120297010110046519028527894956257
32743213763196815586366749275297927955172219667069187668495131196738368218736857
6768372755275862566106038272.0000 |
+-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----------------------------------+
1 row in set (0.00 sec)

// this is the result that came out, but it should be 16.4.
//can someone helpme thank's alot
//my email: roman987@aol.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top