将2张表的查询结果进行分页

ld191474639 2012-08-09 08:53:10
select top 2 * from (select * from actor,movie where actor.aid=movie.mid) c where c.id not in(select top 2 id from c) 
报对象名c无效,请问正确的sql语句该怎么写呢
...全文
266 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
陈绍唐我爱你 2012-08-10
  • 打赏
  • 举报
回复

select top 2 * from (select * from actor,movie where actor.aid=movie.mid )T1
where id not in
(select top 2 id
from
(select * from actor,movie where actor.aid=movie.mid )T2
)

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧