I have a function that works for me in Unity (in conjunction with the database SQLite).
code C#:
public void DeleteAllObj() {
connectionString = "URI=file:"+Application.dataPath+"/TerrainTools/db/object.sqlite";
using (IDbConnection dbConnection = new SqliteConnection(connectionString)) {
dbConnection.Open();
using(IDbCommand dbCmd =dbConnection.CreateCommand()) {
dbCmd.CommandText = "DELETE FROM 'ObjectMap'";
using (IDataReader reader = dbCmd.ExecuteReader()) {
dbConnection.Close();
reader.Close();
return;
}
}
}
}