Results 1 to 4 of 4
Thread: Jdbc
- 04-06-2010, 06:27 PM #1
Member
- Join Date
- Apr 2010
- Posts
- 16
- Rep Power
- 0
Jdbc
I hava a table
Structure is (Item_ID varchar(10),....)
now i want to access the last record value and i want to increment the value of Item_ID field.
Please remember Item_ID is text(varchar) type.
please give me complete Query.Last edited by KumbhaniMehul; 04-06-2010 at 06:59 PM. Reason: i am thinking that you can't understand my Question
- 04-06-2010, 06:29 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Please do not post the same question in multiple sub-forums. I've already give you the solution.
- 04-06-2010, 07:01 PM #3
Member
- Join Date
- Apr 2010
- Posts
- 16
- Rep Power
- 0
ID is varchar type
- 04-07-2010, 02:56 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Is that the only data column you have? If so it's not possible to do that in anyways of I've explain earlier. You must have int value to do that. Just think about, you cannot take a top value by ordering a text data, otherwise not in a sequence. It's really hard to guess that we have such a sequence in text data. So you have to introduce an IDENTITY column. Since your table is record transaction data you MUST those valued data like IDENTITY number, date, etc.
Similar Threads
-
Jdbc
By KumbhaniMehul in forum Java ServletReplies: 1Last Post: 04-06-2010, 06:18 PM -
new to JDBC
By hussainzim in forum JDBCReplies: 12Last Post: 05-01-2008, 11:34 AM -
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