Есть два способа сделать это: -
1) Использовать SQLite Manager для браузера Firefox, а затем инструменты ---> sqlite Manager -> открыть базу данных
Теперь вы можете запуститьзапрос
select * from tablename;Теперь вы можете проверить дубликаты значений вручную.
ссылка для установки SQLite Manager
https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/
2), если вы хотите проверить дубликаты значений через базу данных
-(NSMutableArray *) readFromDatabase:(NSString *)query{
// Setup the database object
sqlite3 *database;
// Init the animals Array
MutableArray = [[NSMutableArray alloc] init];
NSString *readCommand=query;
//readCommand=[readCommand stringByAppendingFormat:@"%@';",patientID];
// Open the database from the users filessytem
if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) {
// Setup the SQL Statement and compile it for faster access
const char *sqlStatement = [readCommand UTF8String];
sqlite3_stmt *compiledStatement;
if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) {
// Loop through the results and add them to the feeds array
while(sqlite3_step(compiledStatement) == SQLITE_ROW) {
// Read the data from the result row
[MutableArray addObject:[NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 0)]];
}
}
// Release the compiled statement from memory
sqlite3_finalize(compiledStatement);
}
sqlite3_close(database);
return MutableArray;
}
вызвать эту функцию.и проверьте возвращенные значения массива.