-1

I have a seemingly simple question but i am not able to get the solution to this. I want this unsorted set of values that i am using to query a db table.

select * from table where _id in (3,6,1,9);

All i want is that the result does not come sorted. The result i am getting is like this :-

_id   Name

 1    Xyz
 3    Abc
 6    PQR
 9    DEF

I would like the result to be unordered like the query. Eg

 _id   Name

  3    Abc
  6    PQR
  1    Xyz
  9    DEF

I tried using OR in the statement, but i still get an ordered result. Is what i require possible?

4

1 回答 1

1
select * from table where _id in (3,6,1,9) ORDER BY RANDOM();
于 2013-01-08T08:04:23.210 回答