Is there a method in which I can retrieve all the data from a particular database column and store it in a string array? My database currently looks like this:
public class DatabaseTotalEntries {
public static final String KEY_ROWID = "_id";
public static final String KEY_NAME = "appliance_name";
public static final String KEY_TOTAL_TIME = "appliance_running_time";
public static final String KEY_TOTAL_COST = "appliance_cost_usage";
public static final String KEY_TOTAL_ENERGY = "appliance_energy_usage";
private static final String DATABASE_NAME = "ApplianceTotaldb"; // The name of the database
private static final String DATABASE_TABLE = "AllEntries"; // The name of the database table
private static final int DATABASE_VERSION = 1;
and I am looking to create a method in which the data under the column 'KEY_TOTAL_COST' for every row/entry in the database is retrieved and stored in a String array
Any hep would be appreciated