Wednesday, January 29, 2014

Oracle rownum value increment by two

Oracle sql query  you can add rownum to get record number. if you want to get record number one after the other you can use following querry

select rownum,rownum+rownum-1 from emp

it's give the result row number one after the other. emp is sample table name.

ROWNUMROWNUM+ROWNUM-1
11
23
35
47
59
611
713
815
917
1019


No comments:

Post a Comment