; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error inyour SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorEx
我将原生C++应用程序从SQLite移植到MySql。在SQLite中,可以使用命名预准备语句参数,如下所示:在MySql文档中没有提到这样的特性。相反,在MySql中,我们使用未命名的参数,如下所示:
SELECT * FROM `Table` WHERE `Id` = ?当查询非常简单时,这不是问题;但是,对于具有10-15个参数复杂查询,如果您必须更新语句,这种方法看