File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes rownum is always 1 for all records! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "rownum is always 1 for all records!" Watch "rownum is always 1 for all records!" New topic

rownum is always 1 for all records!

Ravi Tiruvaipati

Joined: Aug 27, 2003
Posts: 13
Hi Guys,
I am trying to access rownum (predefined column for all tables in Oracle) from java code and for some reason it is always 1 (number) for all the records in the resultset. Here is the query I am tring...

When I try the same sql statement in oracle, it does returns unique values for rownum. I dont understand why the same query doesn't work when tried from java.
appreciate your help.
[ September 30, 2003: Message edited by: Ravi Tiruvaipati ]
Sainudheen Mydeen
Ranch Hand

Joined: Aug 18, 2003
Posts: 218
Hi Ravi
I think this is something to do with the ResultSet.


and give a try
I agree. Here's the link:
subject: rownum is always 1 for all records!
It's not a secret anymore!