开发者

NSPredicate Format Equivalent to SQL query

I have two tables: table1 and table2. What woul开发者_JS百科d be the NSPredicate format equivalent to the following SQL query?

SELECT * FROM table1 where table1.a NOT IN (SELECT table2.b from table2)


Well you can get a list of b values from table2 then do something like this...

[NSPredicate predicateWithFormat:@"NOT (a in %@)", listOfBValues];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜