SQL2000 语句问题 求高人解答

来源:百度知道 编辑:UC知道 时间:2024/05/24 06:29:39
select * from (select top 3 * from (select top 3 * from (from Client) as t1 order by t1.pid asc )as t2 order by t2.pid desc ) as t3 order by t3.showorder asc,t3.pid asc
表名是client 看那里错了啊 谢谢
用hibernate实现分页的sql语句

select * from (select top 3 * from (select top 3 * from (from Client) as t1 order by t1.pid asc )as t2 order by t2.pid desc ) as t3 order by t3.showorder asc,t3.pid asc

最里面的语句错误:
select top 3 * from (from Client) as t1 order by t1.pid asc
select top 3 * from (这里应该是个结果集查询语句)as t1 order by t1.pid asc

你写成了from Client,应该写成select * from Client
这样才是查询结果集