我想在CloudKit中执行数据库查询,就像在SQL中一样:
SELECT *
FROM table1 t1
WHERE NOT EXISTS
(SELECT *
FROM table2 t2
WHERE t1.userid = t2.userid)
你知道怎么做吗?
答案 0 :(得分:0)
尝试 选择 * FROM table1 t1 在哪里t1.userid NOT IN( SELECT t2.userid FROM table2 t2);
或
SELECT t1.userid FROM table1 t1 减去 SELECT t2.userid FROM table2 t2;