Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7566561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:26:48+00:00 2026-05-30T14:26:48+00:00

Previously i had some experience with MS Access and now i am doing JDBC,

  • 0

Previously i had some experience with MS Access and now i am doing JDBC, in Java of course. In MS Access Databases i can have a AutoNumber field, which is very convenient for generating primary keys. I would like to do the same in Java. However, after digging in SO(and google of course) for a few days, what i can find is just some very handy way. One of them is to firstly get the largest primary key( say N ) in the table, and then you insert the latest record with a key of (N+1). This works, i guess, but not efficient. Can any SO genius help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:26:49+00:00Added an answer on May 30, 2026 at 2:26 pm

    MySQL has a similar capability: auto increment. Just add this to your key fields and you’re done.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had previously done some testing projects for Android, but now I have a
I have an application that uses CoreData. I previously had a class named Marker
previously i had custom tableviewcell and was loading from Nib.in that i have specified
Ok, I have a question relating to an issue I've previously had. I know
I am a Haskell newbie, though had a previous Lisp/Scheme experience. Right now I
I have previously only had simple scenarios where I have branched from trunk, made
I am writing a simple database with web access. I have previous experience with
I had previously coded an app with a location listener without access to a
I am starting to create an MSAccess database, I have no Access experience -
Previously we had desktop applications but given the fact that accessing the server (either

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.