jeudi 11 octobre 2018

SQLite Android Select Random Row Excluding Certain Columns

Is it possible to select a random row from an SQLite table however have the row return only specific column information for that row using Android rawquery sort by random? Example:

Table1

  C1      Col2   Col3    Col4

1 A       B      C       D

2 E       F      G       H

3 I       J      K       L

4 M       N      O       P

5 Q       R      S       T

6 U       V      W       X

Is it possible to randomly select a row between 1 and 6 excluding columns C1 and C3 thus returning:

J,L or N,P or V,X etc...

Any examples of a raw query SELECT statement that would accomplish this?




Aucun commentaire:

Enregistrer un commentaire