Sample Header Ad - 728x90

HeidiSQL rounds down double values upon insert...select

0 votes
1 answer
235 views
I have the following table: CREATE TEMPORARY TABLE new_aps ( MinuteStart datetime NOT NULL, ProxyListID bigint(20) NOT NULL, SuccessCount double(22,0) NOT NULL, UnknownCount double(22,0) NOT NULL, FailureCount double(22,0) NOT NULL, PRIMARY KEY (ProxyListID,MinuteStart) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci When I try to run the following query in HeidiSQL: INSERT INTO new_aps (MinuteStart, ProxyListID, SuccessCount, UnknownCount, FailureCount) SELECT NOW(), 1, 0.5, 1.5, 2.5 I get the following entry in new_aps table: SELECT * FROM new_aps "2020-06-11 11:58:19" "1" "0" "1" "2" What am I doing wrong? I need double-precision floating-point values stored in the table. MariaDB version is 10.4.13 on Windows 10 64-bit.
Asked by Serge Rogatch (115 rep)
Jun 11, 2020, 12:06 PM
Last activity: Jun 11, 2020, 09:52 PM