foxpro查询前几条的问题
一考勤表没有主键,我想查出按“编号”排序的前10条记录,每个相同的编号都有几百条记录,应该怎么写sql语句?
“select top 10 * from tabel1 order by 编号”我用这个sql查出了同一编号的几百条记录,怎么只查出10条呢?
[解决办法]
select top 10 * into cursor t1 from tabel1 order by 编号
select * from t1 where between(recno(),1,10)