Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios SQLite中不支持嵌套查询_Ios_Sqlite - Fatal编程技术网

Ios SQLite中不支持嵌套查询

Ios SQLite中不支持嵌套查询,ios,sqlite,Ios,Sqlite,我在iPhone应用程序上使用SQLite数据库,需要执行需要嵌套查询的任务。然而,我的查询似乎不起作用,我在谷歌上搜索了一下,发现SQLite不支持子查询。 有什么解决办法吗 编辑: 这是一个不适合我的查询: select count(*) from quiz where theme=(select id from theme where nom="Houses") and etat=0; 您可以使用联接而不是嵌套查询,这将起作用 作为参考,请检查此 如果子查询select id from

我在iPhone应用程序上使用SQLite数据库,需要执行需要嵌套查询的任务。然而,我的查询似乎不起作用,我在谷歌上搜索了一下,发现SQLite不支持子查询。 有什么解决办法吗

编辑: 这是一个不适合我的查询:

select count(*) from quiz where theme=(select id from theme where nom="Houses") and etat=0;

您可以使用联接而不是嵌套查询,这将起作用

作为参考,请检查此

如果子查询select id from theme where nom=Houses返回多行, 这个主题不起作用。您必须在中使用主题


SQLite支持子查询。你能发布一个不起作用的查询示例吗?嗨,尼克,我已经编辑了我的问题:
select count(*) from quiz where theme IN (select id from theme where nom="Houses") and etat=0;