求sql分页解决方法 - 扩充话题 / 灌水乐园
select * from
(select top 10 * from
(select top 202 * from 表 order by 字段 asc) as A order by 字段 desc) as B order by 字段 asc
如题:最后一页会显示不正确 有没有方法解决。
问错地方了吧
我是来看热闹的
select top 每页显示的记录数 * from topic where id not in
(select top (当前的页数-1)×每页显示的记录数 id from topic order by id desc)
order by id desc
我是来看热闹的
End_rbody_64873684//-->
该回复于2010-04-23 10:03:13被管理员删除
对我有用[0]
丢个板砖[0]
引用
举报
管理
TOP
liguominz
(果然很帅)
等 级:
#6楼 得分:8回复于:2010-04-22 09:12:01
- -!你把这个sql写得好长。。
难道我发水区了?
fuck 赶紧结了 丢人。。。
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
如何在SQL2005中设定定时作业,比如说定时清理某些表的数据,
或者是定时的将某些表的数据导出excel!
在线等待,急急急,最好是详细步骤!
之前我做的作业有点问题!
帮UP
参考:http://hi.baidu.com/toiota ......
刚刚接触MySQL,不知道该如何去查看数据,插入数据,创建数据库、表,用哪为前辈能指教一二?
MySQL 5.1参考手册
引用
兄弟你会结贴吗?
mysql 参考手册
baidu
MySQL官方文档 http://dev.mysql.com/doc ......
字段1,字段2.....字段N,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
想要的结果是:
1,Na ......
id url rank ......