1
我有兩個表:Android上的SQLite查詢?
CREATE TABLE APTable (id_Ap INTEGER PRIMARY KEY AUTOINCREMENT,
SSID TEXT,
BSSID TEXT,
Id_APtest INTEGER NOT NULL,
FOREIGN KEY (Id_APtest) REFERENCES Tests (id_test) ON DELETE CASCADE)
CREATE TABLE APmeasure (id_APmeasure INTEGER PRIMARY KEY AUTOINCREMENT,
RSSI TEXT,
TimeOfMeasure DATETIME,
BSSID TEXT,
id_APm INTEGER NOT NULL,
FOREIGN KEY (id_APm) REFERENCES APTable (id_Ap) ON DELETE CASCADE)
我想檢查是否存在APTable
其中BSSID = x
和id_Aptest=y
一個id_Ap
,並返回id_Ap
值。
我該如何在Android API查詢中做到這一點?