[objective-c]EGODatabase #2 テーブル削除
EGODatabase*db=[EGODatabase databaseWithPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/database.db"]]; NSString*n=@"tableName"; NSString*sql=[NSString stringWithFormat:@"drop table if exists %@",n]; EGODatabaseResult*result=[db executeQuery:sql]; if (result.errorCode) {//failed }else{//success }
参考サイト
enormego/egodatabase · GitHub
https://github.com/enormego/egodatabase