-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?

Swati Rawat
  • 1,729
  • 1
  • 19
  • 34

1 Answers1

1
select * from table where _id in (3,6,1,9) ORDER BY RANDOM();
confucius
  • 13,127
  • 10
  • 47
  • 66