On 1/14/2013 9:48 AM, François-xavier Jacobs wrote:
i would like to "seed random" a request, so i could do use some pagination system with a order by random(), is this possible sqlite ? when a tried to use "order by 1234567892" it always return the same order
random() returns a different value on every call. So the rows for which it just happens to return a smaller value get sorted before rows for which it happens to return a larger value.
When you do "order by 1234567892", each row gets associated with the same value, so the ORDER BY clause doesn't induce any particular order. It doesn't matter whether the value is large or small. I'm not sure what good you expected such a clause to achieve.
I'm also really curious as to what line of reasoning has led you to conclude that using a large constant value would do something different than using a small constant value. What kind of magic do you believe "huge numbers" possess that small numbers don't?
-- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users