samedi 4 février 2017

how to change values in same columns in different rows by random, in database

// Create a String that contains the SQL statement to create the pets table String SQL_CREATE_NAMES_TABLE = "CREATE TABLE " + NameContract.NameEntry.TABLE_NAME + " (" + NameContract.NameEntry._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + NameContract.NameEntry.COLUMN_NAME + " TEXT NOT NULL, " + NameContract.NameEntry.COLUMN_WHO + " TEXT NOT NULL, " + NameContract.NameEntry.COLUMN_TIME + " TEXT NOT NULL, " + NameContract.NameEntry.COLUMN_LOCATION + " TEXT NOT NULL, " + NameContract.NameEntry.COLUMN_DOING + " TEXT NOT NULL )" ;


explaining and request

I want create a button that when user press it, can replace values of same columns between random rows exception id column.

example

ex:value of column_name of ID number1 change by another (random)Id,and value of column_name of Id number 2 change by another(random)Id ...to the final row. and this action do for other columns as well. to sum up:the values of same columns in different Id change with each other.




Aucun commentaire:

Enregistrer un commentaire