wood burning stoves 2.0*
The moose likes JDBC 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

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
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: http://aspose.com/file-tools
subject: rownum is always 1 for all records!