Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rownum in db2

Status
Not open for further replies.

PatelRam

Programmer
Aug 20, 2003
87
US
What is equivalent of Oracle rownum in db2 ?

for eg.


Create tabe dept
(
deptno number(8)
deptname char(10)
loc char(10)
seq_no nummber(8)
)

insert into dept(deptno,deptname,loc,seq_no)
select dept_no,
deptname,
loc,
rownum
from table dept_region



My question is how do I write above rownum in db2.
 
PatelRam,

Have a look at thread178-307573 or thread178-926150 to see if they help.

Marc
 
The brutal truth is, I don't believe DB2 has a nifty equivalent function to ROWNUM, at least in V7. That's why Marc steered you to the threads on generating your own.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top