MySQL query works in version 5.6 but returns errors in mysql version 8

41 Views Asked by At

I am not SQL expert therefore am scratching my head why this query would not work in MySQL-community-server 8.0 but it works absolutely fine in MySQL 5.6.

I have recently migrated from mysql 5.6 to version 8.0. Maybe I have missed something.

See below.

mysql> INSERT INTO images(SystemRoot, BaseBuildRevisionNumber, BuildBranch, BuildGUID, BuildLab, BuildLabEx, CompositionEditionID, CurrentBuild, CurrentBuildNumber, CurrentMajorVersionNumber, CurrentMinorVersionNumber, CurrentType, CurrentVersion, EditionID, EditionSubManufacturer, EditionSubstring, EditionSubVersion, InstallationType, InstallDate, ProductName, ReleaseId, SoftwareType, UBR, PathName, ProductId, DigitalProductId, DigitalProductId4, PendingInstall, DisplayVersion, InstallTime, Software, System, Manufacturer, Model, Systype, Serial, HDD1, HDD2, HDD3, HDD4, Partitions, OurParts, Date, Time, FileName, CurrentOperation, Progress, Status, TotalParts, CurrentPartition, DiskRead, DiskWrite, NetBandwidth, NetUp, NetDown, CPU, PartitionType, PartitionDetails, ImageByParts, ImageFileNames) Values ("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "UEFI", "Dell Inc.", "Latitude 3510", "Notebook", "BFVS303", "128 GB", "None", "None", "None", "sda1 sda2 sda3 sda4 sda5 sda6", "1", "2023-11-10", "18:32:57", "Dell_Inc._Latitude_3510_Notebook_wj2GQdFq", "", "", "", "", "", "", "", "", "", "", "", "gpt", "1", "True", "Dell_Inc._Latitude_3510_Notebook_wj2GQdFq-sda1.img.gz");
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'System, Manufacturer, Model, Systype, Serial, HDD1, HDD2, HDD3, HDD4, Partitions' at line 1

However, if I run the exact same query in mysql 5.6 it works fine, see below.

mysql> INSERT INTO images(SystemRoot, BaseBuildRevisionNumber, BuildBranch, BuildGUID, BuildLab, BuildLabEx, CompositionEditionID, CurrentBuild, CurrentBuildNumber, CurrentMajorVersionNumber, CurrentMinorVersionNumber, CurrentType, CurrentVersion, EditionID, EditionSubManufacturer, EditionSubstring, EditionSubVersion, InstallationType, InstallDate, ProductName, ReleaseId, SoftwareType, UBR, PathName, ProductId, DigitalProductId, DigitalProductId4, PendingInstall, DisplayVersion, InstallTime, Software, System, Manufacturer, Model, Systype, Serial, HDD1, HDD2, HDD3, HDD4, Partitions, OurParts, Date, Time, FileName, CurrentOperation, Progress, Status, TotalParts, CurrentPartition, DiskRead, DiskWrite, NetBandwidth, NetUp, NetDown, CPU, PartitionType, PartitionDetails, ImageByParts, ImageFileNames) Values ("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "UEFI", "Dell Inc.", "Latitude 3510", "Notebook", "BFVS303", "128 GB", "None", "None", "None", "sda1 sda2 sda3 sda4 sda5 sda6", "1", "2023-11-10", "18:32:57", "Dell_Inc._Latitude_3510_Notebook_wj2GQdFq", "", "", "", "", "", "", "", "", "", "", "", "gpt", "1", "True", "Dell_Inc._Latitude_3510_Notebook_wj2GQdFq-sda1.img.gz");
Query OK, 1 row affected (0.00 sec)

Maybe someone expert with databases and mysql queries can help me spot the error.

0

There are 0 best solutions below