Brandon, Nicholas wrote: > CREATE TABLE MyTable(start_col int,end_col int); > INSERT INTO "MyTable" VALUES(-200000000, 200000000); ... > sqlite> select * from MyTable join (select random(*) as number) as rand > where start_col >= rand.number and end_col < rand.number;
Your logic is broken. As every of your row's start_col is less than end_row, the result set will be empty for every possible value of rand.number. Don't even know what you expected to get with this query.