There is a table name Top_Up. Its current snapshot is:
When I run query SELECT * FROM Top_Up WHERE Top_up_ID = (round(random() * 9 ) + 1); on it, I am getting random result. Sometimes it is returning with two tuples, sometimes no tuples and sometime one tuple.
To debug I run the query Select (round(random() * 9 ) + 1); and it is always returning only one tuple in the result.
Why I am getting this vague and random result?
select * from Top_Up where Top_up_ID<=10 order by random() limit 1;?