如何使用核心数据编写sqlite查询

时间:2010-11-19 12:26:55

标签: iphone

请帮助我,

我想使用coredata编写查询(如下所述)。

select primKey, ( primKey - 5 ) as **d** from TABLE Order by **d** limit 1.

1 个答案:

答案 0 :(得分:2)

你不能--CoreData不是ORM或数据库而且声称不是。它可以由SQL lite支持(或者可能不支持),但这是一个实现细节。

see some of the other times this has come uphere

您需要使用NSPredicate进行提取