SQLite不支持嵌套查询

Luc*_*uca 2 sqlite ios

我在我的iPhone应用程序上使用SQLite数据库,我需要执行需要嵌套查询的任务.但是,我的查询似乎不起作用,我用谷歌搜索它,我发现SQLite不支持Subquerys.有什么解决方案吗?

编辑: 这是对我不起作用的查询:

select count(*) from quiz where theme=(select id from theme where nom="Houses") and etat=0;
Run Code Online (Sandbox Code Playgroud)

Nic*_*kis 5

如果子查询(select id from theme where nom="Houses")返回多行,
theme =不会起作用.你必须theme IN改用.

select count(*) from quiz where theme IN (select id from theme where nom="Houses") and etat=0;
Run Code Online (Sandbox Code Playgroud)