I have a query which checks the data inside the set or not, then orders by random with a seed value.

Example

set seed to 0.1; 
select * from table where id in (1,2,3) order by random() limit 10;

since the seed value purpose is to give me the exact same result every time. But I couldn't get the same result with the above query.

But if I run the below query it's giving me exactly the same result every time.

set seed to 0.1;
select * from table order by random() limit 10;

Is there any wrong using the IN condition while using random seed value?

Thanks in advance.

0 Answers