我有一个非常奇怪的sqlite语法错误。
const char *statement = "DELETE FROM quotes t1 WHERE t1.id=127";
int returnCode = sqlite3_exec(database, statement, NULL, NULL, &errorMsg);
if (returnCode!=SQLITE_OK)
{
fprintf(stderr, "Error: %s", errorMsg);
sqlite3_free(errorMsg);
}
Error: near "t1": syntax error
但是这段代码效果很好
const char *statement = "DELETE FROM quotes WHERE id=127";
int returnCode = sqlite3_exec(database, statement, NULL, NULL, &errorMsg);