MariaDB 1064 Error: SQL Syntax Error Near 'INSERT INTO' - Troubleshooting Guide
The error "1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INSERT INTO benz_module_info (index_id, module_id, ident_id, hardware_supplie...' at line 2" is likely occurring because you have multiple SQL statements separated by semicolons, and you are trying to execute them all at once. In most cases, only one SQL statement can be executed at a time. To fix the error, you need to separate the SQL statements and execute them one by one. Here is an example: 1. Execute the first SQL statement: `INSERT INTO benz_module_info (index_id, module_id, ident_id, hardware_supplier, hardware_id, sw_supplier, sw_id, hw_sw_rel, supplier_id, serial_no, prod_date) VALUES ('1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '2022-01-01');` 2. Execute the second SQL statement: `INSERT INTO benz_module_info (index_id, module_id, ident_id, hardware_supplier, hardware_id, sw_supplier, sw_id, hw_sw_rel, supplier_id, serial_no, prod_date) VALUES ('2', '2', '2', '2', '2', '2', '2', '2', '2', '2', '2022-01-02');` Make sure to adjust the values in the INSERT statements according to your requirements.
原文地址: https://www.cveoy.top/t/topic/pIrr 著作权归作者所有。请勿转载和采集!