SQLite Random() In ORDER BY not sorting correctly SQLite Random() In ORDER BY not sorting correctly sqlite sqlite

SQLite Random() In ORDER BY not sorting correctly


Why do the results not sort by the third column?

Because the column is an expression that is re-evaluated for ORDER BY purposes, producing different random values.

Sorry, at the moment can't think of a practical way to preserve the random order value on each row. Consider changing your requirements - ORDER BY RANDOM() does not perform well on large datasets anyway.