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];
精彩评论