gpt4 book ai didi

android.database.sqlite.SQLiteException : near "where": syntax error (code 1):

转载 作者:搜寻专家 更新时间:2023-10-30 22:11:02 24 4
gpt4 key购买 nike

我在下面的代码中得到android.database.sqlite.SQLiteException: near "where": syntax error (code 1): exception..我哪里出错了?

String selectQuery = "SELECT  * FROM " + TABLE_VIDEO + " order by " + KEY_TIMESTAMP + " ASC "+"where " + KEY_TYPE + "='trending'";

最佳答案

ORDER BY 必须是查询中的最后 SQL 子句。
因此,它必须在 WHERE 条件之后

关于android.database.sqlite.SQLiteException : near "where": syntax error (code 1):,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28972591/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com