Susan Ottwell wrote: > How would one insert rows randomly within a range of 1000 rows? I can > easily enough do this in the script that calls the insert function, > but it would be more efficient if I could use an sqlite function or > feature to do this. >
I'm not sure if this is what you are asking or not, but you can use the random function to generate the rowid for a table. The modulo operator can be used to restrict the range of values produced. create table t(id integer primary key, data text); insert into t values(random() % 1000, 'some data'); This will insert a row with a rowid somewhere between 0 and 999. HTH Dennis Cote _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users