我要显示表中的最10条记录,请我的SQL应该怎么写,不进行排序,按次序的那种
给出结果就给加分!!!

解决方案 »

  1.   

    select top 10 xxx from xxx
      

  2.   

    select top 10 * from 表
      

  3.   

    sql server:
    select to 10 * from table
    oracle:
    select * from table where rownum < 11
      

  4.   

    前10条记录 
    select top 10 * from 表1
     
    后10条记录 
    select * from 表1 where 
    某字段 not in (select top (select count(*)-10 from 表1) 某字段 from 表1)
      

  5.   

    To wmt85(深山老翁 交天下朋友论天下事 MSN [email protected]) ( ) 信誉:100 
    -----------------------------------------------------------------------
    如果有重复字段,那样就得不到我们想要的结果了有主键或唯一值字段,结果完全成立
    楼主参考
    select identity(int,1,1) as id,* into #1 from 表1
    select top 10 * from #1 order by id desc
    以上是取最后10条
    select top 10 * from #1
    不加则为前10条
      

  6.   

    select to 10 * from table