0

i using jdbc driver (node-jdbc) for getting schema using node js

row data :

enter image description here

i have already tried and got this result in console ( https://prnt.sc/umlb7m )

enter image description here

why i got wrong return value with float type?

or can i parse this float data type?

that i want is getting a real float value from table, anyone can help?

1 Answers1

0

It seems you want to store numbers with exact precision, but you are using a floating point data type instead, such as FLOAT, REAL, or DOUBLE.

Define the column amount as DECIMAL.

For example, if you need 6 places at the left of the decimal point, and one at the right, you can use DECIMAL(7,1). In this type you can store values such as 1.0 or 123456.7.

The Impaler
  • 45,731
  • 9
  • 39
  • 76