我想可以这样实现:
1——
在你的表中设置一个日期时间字段,用于记录最近一次被抽取到的记录的抽取时间2——
然后使用下面的语句实现(假设10条):
update table set seleteddate=getdate() where id in (select top 10 id from table where seleteddate 小于指定的时间 order by newid())
select top 10 * from table order by seleteddate desc

解决方案 »

  1.   

    你建个临时表放已经抽到的人如10个人insert 已经抽到的人 (列和你的表一样) select top 10 * from 你的表 order by newid()
      

  2.   

    你建个临时表放已经抽到的人如10个人insert 已经抽到的人 (列和你的表一样) select top 10 * from 你的表 where 编号 not in (select 编号 from 已经抽到的人) order by newid()
      

  3.   

    在你的数据表里,加两个字段
    一个是  抽取标志(CqBz BIT类型) 1为已抽取,0为未抽取
            抽取时间(CqSj DATETIME类型)  最后一次抽取时间然后写个触发器,更新抽取时间时候触发更新标志为1然后随便抽取n条记录从表里,条件是现在日期-最后抽取日期必须大于……
                             并且标志为0