How can run sql query CoreData similar this:
SELECT COUNT(*) FROM headphones WHERE id IN (SELECT id FROM old_headphones);
I read NSPredicate guide and NSExpression, but don’t understand how to do this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this:
When there is not an n-to_1 relation between headphones and old_headphones, you can omit the DISTINCT.