Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: getting a consecutive string value from database through JDBC

  1. #1
    Member
    Join Date
    Nov 2010
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default getting a consecutive string value from database through JDBC

    Hi All ,
    Can you help me with this solution .I have a employee table with column employee id .

    I want to have SQL procedure or query to where current employee id =prevoius employeeid +1

    Thanks


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: getting a consecutive string value from database through JDBC

    Just use math:
    SELECT whatever_columns FROM whatever_table WHERE my_id=previous_id+1;

Similar Threads

  1. JDBC
    By Abdul Rasheed in forum JDBC & Databases
    Replies: 1
    Last Post: August 13th, 2010, 07:01 AM
  2. Help regarding JDBC connectivity in JSP
    By Lovable_Kumar in forum JDBC & Databases
    Replies: 0
    Last Post: May 30th, 2010, 11:53 AM
  3. Help with JDBC
    By michaelmel in forum JDBC & Databases
    Replies: 0
    Last Post: May 14th, 2010, 07:11 AM
  4. Replies: 1
    Last Post: January 15th, 2010, 01:32 AM
  5. JDBC Problem
    By seejay in forum JDBC & Databases
    Replies: 1
    Last Post: September 16th, 2009, 07:55 AM