rand(-1) & seed the randomw number generator select top 10 rand() as randkey, * ; from ... ; order by 1Although in VFP it's possible that you will get more than 10 rows if ties are involved so you need to check for that condition. VFP9 will fix this problem.