This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "rownum is always 1 for all records!" Watch "rownum is always 1 for all records!" New topic
Author

rownum is always 1 for all records!

Ravi Tiruvaipati
Greenhorn

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.
regards
ravi
[ 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.
Replace

to

and give a try
---------------
Sainudheen
 
Don't get me started about those stupid light bulbs.
 
subject: rownum is always 1 for all records!
 
Similar Threads
Help with JSP and Access queries!
DSN problem
How do we know if there no records in resultset
jsp & database
Want to convert my code in method