sqlServer中有没有伪列?

java_fox 2002-10-14 11:50:53
类似于oracle中rownum的关键字,多谢
...全文
346 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
microlong 2002-10-14
  • 打赏
  • 举报
回复
楼上的方法很好:)
j9988 2002-10-14
  • 打赏
  • 举报
回复
select identity(int,1,1) as id,* into #temp from tablename WHERE ...

select * from #temp where id between 301 and 310
j9988 2002-10-14
  • 打赏
  • 举报
回复
select identity(int,1,1) as id,* into #temp from tablename
select * from #temp where id between 301 and 310

java_fox 2002-10-14
  • 打赏
  • 举报
回复
我想取出符合条件的第301-310条记录,又不想取出所有数据,有没有好的解决方案?
j9988 2002-10-14
  • 打赏
  • 举报
回复

34,838

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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