Home > Database > Mysql Tutorial > body text

在Oracle里面为读取出来的数据添加一个序号

WBOY
Release: 2016-06-07 17:27:00
Original
1717 people have browsed it

在Oracle里面为读取出来的数据添加一个序号 我们在给客户演示报表的时候,有时候客户会提出在报表的第一列,能不能添加一个序号

在Oracle里面为读取出来的数据添加一个序号

我们在给客户演示报表的时候,有时候客户会提出在报表的第一列,能不能添加一个序号

但是如果通过修改程序代码的方式来做,是可以实现,不过做起来会比较麻烦,,

有个比较实用的方式可以解决,那就是通过ORACLE里面的RowNum,函数来取,

例如:select id,name from tablename 来展示客户需要的数据,

那么我们可以通过,select rownum,id,name from tablename,来把序号以及需要展示的数据一起读取出来

然后只要在报表(fastreport或者其他报表)里面添加一个字段,用来显示记得。

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!