2012-03-02 97 views
2

我在我的iPhone應用程序上使用SQLite數據庫,我需要執行需要嵌套查詢的任務。然而,我的查詢似乎不工作,我GOOGLE了它,我發現SQLite不支持Subquerys。 有沒有解決方法?SQLite中不支持嵌套查詢

編輯: 這是不爲我工作查詢:

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

SQLite支持子查詢。你可以發佈一個不起作用的查詢的例子嗎? – 2012-03-02 09:02:11

+0

嗨,尼克,我編輯了我的問題:) – Luca 2012-03-02 09:09:01

回答

5

如果子查詢(select id from theme where nom="Houses")返回多行,
theme =不會工作。您必須改用theme IN

​​