SQLite 原始查询出现问题!
我正在尝试在 SQLite 中执行原始查询。
我想从一个表中选择所有 id 等于另一个表中的另一列的内容,但无法使其正常工作。
我一直在尝试执行的查询处于当前状态:
"SELECT * FROM " + table1 + " WHERE " +
id + " EQUALS " + FriendsIntId +
" FROM " + table2
这里显然有问题,有人可以向我指出吗?
I'm trying to do a raw query in SQLite.
I want to select all from one table where id equals another column from another table, but can't get it to work properly.
The query I've been trying to do is in it's current state:
"SELECT * FROM " + table1 + " WHERE " +
id + " EQUALS " + FriendsIntId +
" FROM " + table2
There is obviously something wrong here, can someone point it out to me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
=
代替。多个
FROM
子句没有任何意义。阅读有关选择的 SQLite SQL 语法 文档。也许你想要一个子选择:?
EQUALS
keyword does not exist in SQLite. Use=
instead.Multiple
FROM
clauses have no meaning. Read the SQLite SQL syntax documentation on selects. Maybe you want a subselect:?