我正在开发一个 Android 3.1 应用程序。
我有以下表格:
FormBlock
---------
FormId (INTEGER) FOREIGN KEY TO Form.id
BlockId (INTEGER) FOREIGN KEY TO Block.id
Block
----------
id (INTEGER) PRIMARY KEY
name (TEXT) NOT NULL
orderInForm (INTEGER) NOT NULL
我想做以下选择:
SELECT block.blockId, block.name, block.orderInForm FROM Block, FormBlock WHERE FormBlock.FormId = 1 AND block.blockId = FormBlock.blockId;
如何使用 SQLiteDatabase.query(...) 或 执行该选择语句rawQuery()
?