I have a software which automatically creates a MySQL table with doublequotes in the column name, and I can't change this behavior.
HeidiSQL has problems to handle those columns correctly.
Using the MySQL command line client, it is no problem to run this code:
CREATE TABLE TestLog (
`myInt` INT,
`"myFunnyFloat"` FLOAT,
`"myFunnyString"` VARCHAR(30),
`"myFunnyInt"` INT,
`"myFunnyDateTime"` DATETIME
) ENGINE=InnoDB
INSERT INTO TestLog VALUES ('42', '3.141', 'Hello Heidi', '21', '2017-12-14 10:00:00');
SELECT * FROM testlog;
+-------+----------------+-----------------+--------------+---------------------+
| myInt | "myFunnyFloat" | "myFunnyString" | "myFunnyInt" | "myFunnyDateTime" |
+-------+----------------+-----------------+--------------+---------------------+
| 42 | 3.141 | Hello Heidi | 21 | 2017-12-14 10:00:00 |
+-------+----------------+-----------------+--------------+---------------------+
1 row in set (0.00 sec)
In HeidiSQL, one can create the table this way, too, but inserting the data fails.
Further more, all columns are displayed blue like integers in the data tab, and apart from the first column, there is no column name. The data itself is displayed as
42 | 3.141 | He.llo. He.idi | 21 | 2.017.-12.-14. 10.:00.:00
which is somewhat weird.
(I'd insert a screenshot here, but Github doesn't let me)
HeidiSQL indeed thinks those columns are INTs without names, as its own CREATE-code shows:
CREATE TABLE `testlog` (
`myInt` INT(11) NULL DEFAULT NULL,
`` INT NULL,
`` INT NULL,
`` INT NULL,
`` INT NULL
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;
Playing with this issue shows that for each row with doublequotes in its column name, HeidiSQL deletes the column name and assigns the data type of the last row without doublequotes.