Results 1 to 6 of 6
- 03-28-2010, 07:53 PM #1
Member
- Join Date
- Aug 2009
- Posts
- 23
- Rep Power
- 0
- 03-29-2010, 10:58 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
There's no such thing as the "first record"...unless you put an "order by" in the query.
- 03-29-2010, 12:22 PM #3
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Google "<Your database name> rownum"
- 03-29-2010, 01:15 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Still won't matter.
rownum is (usually) simply a tag onto a query. It's not a physical thing.
Consequently, as I said, the concept of "first record" is meaningless without an order by...there's no guarantee (in SQL) that you'll get the rows back in the same order for the next time you run the query.
So the OP needs to figure out why, exactly, the result returned by the db was wrong.
- 03-29-2010, 03:28 PM #5
Hi,
You can use scrollable ResultSet....u can set the pointer to first record using
first() in ResultSet and then u can retreive.
-Regards
RamyaRamya:cool:
- 03-29-2010, 03:34 PM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Similar Threads
-
Record Button
By nicezam in forum NetBeansReplies: 3Last Post: 04-27-2009, 03:53 AM -
pointing to 1st record in a file
By swati.jyoti in forum New To JavaReplies: 1Last Post: 04-25-2009, 08:38 AM -
how to delete record from db using jsp
By Manas Das in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 01-31-2009, 07:36 PM -
Can't record sound
By bozovilla in forum Java AppletsReplies: 12Last Post: 08-04-2008, 03:57 PM -
selecting a record in database
By ramachandran in forum New To JavaReplies: 0Last Post: 10-25-2007, 07:06 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks