怎么做行号查询

编程入门 行业动态 更新时间:2024-10-24 08:19:44
本文介绍了怎么做行号查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想用sql查询打开一个结果集,比方说我希望光标 指向我开头的任何位置给出一个行号,所以是 无论如何我可以使用sql函数来做到这一点,所以当 结果集返回时,第一行将是绝对行dertermine由 行号

解决方案

xixi写道:

我想用sql查询打开一个结果集,说我想要光标<通过给出一个行号指向我开始的任何位置,所以是无论如何我可以使用sql函数来做到这一点,所以当结果集返回时,第一行将是绝对行dertermine由行号

我不明白你的问题,但你可以使用row_number()函数 为结果集中的每一行添加一个唯一的数字。 - Knut Stolze 信息n整合 IBM德国/耶拿大学

xixi写道:

我想用sql查询打开一个结果集,说我希望光标指向我通过给出行号开始的任何位置,所以是无论如何我还可以使用sql函数来做到这一点,所以当结果集返回,第一行将是绝对行dertermine的行号

我不明白你的问题,但是你可以使用row_number()函数 为结果集中的每一行添加一个唯一的数字。 - Knut Stolze 信息集成 IBM德国/耶拿大学

同时查看可滚动游标 。 干杯 Serge - Serge Rielau DB2 SQL编译器开发 IBM多伦多实验室

i want to use sql query to open a resultset, say i want the cursor point to whatever position i start with by giving a row number , so is there anyway i can use the sql function to do that, so when the resultset return, the first row will be the absolute row dertermine by the row number

解决方案

xixi wrote:

i want to use sql query to open a resultset, say i want the cursor point to whatever position i start with by giving a row number , so is there anyway i can use the sql function to do that, so when the resultset return, the first row will be the absolute row dertermine by the row number

I don''t understand your question, but you can use the row_number() function to add a unique number for each row in the result set. -- Knut Stolze Information Integration IBM Germany / University of Jena

xixi wrote:

i want to use sql query to open a resultset, say i want the cursor point to whatever position i start with by giving a row number , so is there anyway i can use the sql function to do that, so when the resultset return, the first row will be the absolute row dertermine by the row number

I don''t understand your question, but you can use the row_number() function to add a unique number for each row in the result set. -- Knut Stolze Information Integration IBM Germany / University of Jena

Also look into "scrollable cursors". Cheers Serge -- Serge Rielau DB2 SQL Compiler Development IBM Toronto Lab

更多推荐

怎么做行号查询

本文发布于:2023-10-26 09:36:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1529779.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:行号   怎么做

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!