access中有ROWNUM吗?

zhangtenyu 2002-11-24 01:21:32
在oracle的sql中有个关键字ROWNUM,可以返回当前记录的行号。
例如:
SQL> select ROWNUM,name from t1 order by name;

ROWNUM NAME
---------- --------------------
6 ZHANG
5 Zh
3 other
1 zhang1
4 zhang2
2 zy

请问在access(Microsoft Jet SQL)中有没有相同或类似的关键字(不是top,我需要得到行号),谢谢!
...全文
410 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
奇遇 2002-11-25
  • 打赏
  • 举报
回复
^_^ 拼音不好,又不会五笔,只好献丑了 :)
fjfzman 2002-11-25
  • 打赏
  • 举报
回复
not so well?
chinese English?
奇遇 2002-11-25
  • 打赏
  • 举报
回复
U can add a autoincrement or counter type column named 'idnum'.
Then U can use the following query get rownum.

SELECT dcount("idnum","t1","idnum<="&idnum) as ROWNUM,name from t1 order by name;

But the efficiency of this query not so well :)
fjfzman 2002-11-25
  • 打赏
  • 举报
回复
可以做一个查询,用WHERE语句:
where mytable.rownum=5 (大意)
hyh888 2002-11-25
  • 打赏
  • 举报
回复
给数据库添加一个自动编号字段,搞定.
w_rose 2002-11-24
  • 打赏
  • 举报
回复
create table myTable (rowNum counter,......)
hycao 2002-11-24
  • 打赏
  • 举报
回复
没有~~~~~~
奇遇 2002-11-24
  • 打赏
  • 举报
回复
There should be not this function in access.

7,714

社区成员

发帖
与我相关
我的任务
社区描述
Microsoft Office Access是由微软发布的关系数据库管理系统。它结合了 MicrosoftJet Database Engine 和 图形用户界面两项特点。
社区管理员
  • Access
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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