1

I have a mysql 5.7.25 database hosted on Amazon RDS I'm trying to insert doubles to. I inherited roughly 40 columns all Datatype DOUBLE with the Length/Set as reported by heidisql as (22,0). For months now I've been inserting data to this table and the records will have values such as 3.73850926 or 0.12856129 etc which is what I expected.

screenshot of table in heidi sql

Recently I added another 23 columns in heidi sql and these are also set to (22,0)

enter image description here

What's baffling to me is that the new values are being rounded to 0, 2, 1, etc. It seems like they're actually following the (22,0) setting as I now understand it. Am I missing something here or is it likely that heidisql is misreporting the actual length/set of the old columns?

Here's a part of one data row in the db: UnderlyingPrice_19 is a "new" column, and the LeanedTheo column is "old"

enter image description here

Any recommendations on how to fix this up so I can get actual precision in the new columns?

jawknee530
  • 319
  • 4
  • 12
  • I suggest you [edit your question](https://stackoverflow.com/posts/62033491/edit) and provide all those tables in photos as tabulator in textual format. You can use [ASCII table formatter](https://ozh.github.io/ascii-tables/) to format the tables. Also, please refer to [why should I provide a MRE/MCVE](https://meta.stackoverflow.com/questions/333952/why-should-i-provide-a-minimal-reproducible-example-for-a-very-simple-sql-query). – FanoFN May 27 '20 at 00:31
  • To know what is actually going on, please use `show create table tablename` and add this to your question. You can leave out repetitions (e.g. LeanedTheo_2 to 40), but the relevant information is the difference between the two kind of columns. – Solarflare May 27 '20 at 08:13

0 Answers0