This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Originally posted by Muhammad Saifuddin: you can use Last() method to moves your cursor to the last row in the ResultSet object. see Java Doc here.
The last row in a Resultset object might not be the last added row. The requestor will first have to define the criterea that determine the last added row. Using the highest auto-generated record ID might not help, because several databases pool sequence IDs, and do not guarantee that these IDs are used in order.
just write the query appropriately depending on your database design, although why you would want to do this is beyond me...it's better to use exact criteria rather than being arbitrary such as "last updated row" [ March 26, 2008: Message edited by: Kevin Smither ]
Joined: Nov 02, 2007
In one interview there ask this question,that's why i ask u