CloudKit - 如何执行Not Exists查询?

时间:2016-07-11 12:30:32

标签: cloudkit not-exists

我想在CloudKit中执行数据库查询,就像在SQL中一样:

SELECT *
FROM table1 t1
WHERE NOT EXISTS 
    (SELECT *
    FROM table2 t2
    WHERE t1.userid = t2.userid)

你知道怎么做吗?

1 个答案:

答案 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;