如果我使用遊標,我不能在下面的代碼中使用「cursor.getString」。 我發現「Cursor.count = 0」。Android:SQLite,如何從多個表中選擇count(*)?
但是,如果我在adb shell中執行此代碼,我可以得到結果「10 | 15 |」。
我可以知道原因或如何實現我的目標?非常感謝。
select (select count(*) from table1) as count1, (select count(*) from table2) as count2;
這不會提供兩個表中各個行的計數。錯誤的答案。 – ErikE 2013-03-06 18:00:01
解答已更新。 – Sajmon 2013-03-06 18:27:05