比如,我要选取select * from tbStu中第5条记录该怎么写?
谢了!

解决方案 »

  1.   

    select * from tbStu where id=5
      

  2.   

    按时间排序
    或者我换解决方法
    怎么给记录编号
    比如我要联合两张表
    select * tbStu1 UNION select * tbStu2tbStu1
    王二 男 广东tbStu2
    张三 男 山东现在需要得到下列一张表
    1 王二 男 广东
    2 张三 男 山东
      

  3.   

    有标识列的话
    select top 1 * from 表或查询结果集 where 标识列 not in (select top 4 标识列 from 表或查询结果集)
      

  4.   

    select did=identity(int,1,1),*  into e  from 
    (select * tbStu1 UNION select * tbStu2) tselect * from e
    where did=5
    drop table e
      

  5.   

    插入新表select identity(int,1,1) id,* into #新表 from
    (select * from tbStu1 
      union all
     select * from tbStu2) t
    select * from #新表
      

  6.   

    union会合并2条相同的记录
    union all则不会,lz留意一下。