注册 登录
编程论坛 SQL Server论坛

求教SQL语句

fandgg 发布于 2007-11-28 08:40, 857 次点击
假如一个数据表 a,要求他的第5至第8条记录,a表无序
请问各位大侠怎么写呢?
4 回复
#2
bygg2007-11-28 09:31
ORACLE里面倒有个rowid
a 表无序....
#3
fandgg2007-11-28 09:51
sql Server 数据库 ,用的是
#4
XieLi2007-11-28 10:02
可以自己做一个函数实现吧,
不知道SQL里面有没有这个函数.
#5
purana2007-11-28 10:14
select id=identity(int,1,1),* into # from tb
select top 3 from # where id no in(select top 5 id from #)
1