iOS 数据库主键重复,依然可以插入

+ (void)insertWithSetKeyName:(NSString *)keyName Value:(NSString *)value;
{
    [self open];
   
    NSString * sql = [NSString stringWithFormat:@"insert or ignore into PTBBSet values ('%@', '%@')", keyName, value];

    sqlite3_exec(dbPoint, sql.UTF8String, NULL, NULL, NULL);
   
}
 

转载于:https://www.cnblogs.com/gaojingxuan/p/4834950.html

你可能感兴趣的:(iOS 数据库主键重复,依然可以插入)