Results 1 to 2 of 2
Thread: Jdbc
- 04-06-2010, 05:37 PM #1
Member
- Join Date
- Apr 2010
- Posts
- 16
- Rep Power
- 0
- 04-06-2010, 06:18 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If you want to find the last row in a table in a DB which has a IDENTITY column which named as ID then use the following.
Or else you can use TOP 1 on the table with ordered data in descending order.SELECT * FROM TABLE WHERE ID = (SELECT MAX(ID) FROM TABLE)
Is that you want to know?
Similar Threads
-
Jdbc
By HariPrasad in forum JDBCReplies: 1Last Post: 07-30-2009, 05:07 AM -
JDBC for DB2
By mostafa-sky in forum JDBCReplies: 1Last Post: 03-21-2009, 05:17 PM -
How to use JDBC Template classes to control basic JDBC processing and error handling
By Java Tip in forum Java TipReplies: 0Last Post: 04-01-2008, 10:17 AM -
How to use JDBC Template classes to control basic JDBC processing and error handling
By JavaBean in forum Java TipReplies: 0Last Post: 09-28-2007, 12:56 PM -
Ha-jdbc 2.0
By JavaBean in forum Java SoftwareReplies: 0Last Post: 07-17-2007, 05:40 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks