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

  • Home
  • SEARCH
  • 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 7590007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:18:07+00:00 2026-05-30T20:18:07+00:00

I am busy with a school project where I query a database based on

  • 0

I am busy with a school project where I query a database based on a server from a client. One of the requirements is to retrieve the next available AutoNumber from the database.

What would the SQL query be to retrieve the next available Autonumber? Is it possible to do this?

  • 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-30T20:18:08+00:00Added an answer on May 30, 2026 at 8:18 pm

    It depends on the flavor of the RDBMS. MariaDB (MySQL) have LAST_INSERT_ID() function which gives you the last value of an AUTO_INCREMENT field.

    Databases that support sequences (say Ingres) allow you to get next value with something like:

    SELECT NEXT VALUE FOR some_sequence;
    

    or

    SELECT some_sequence.NEXTVAL;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I´m busy converting an existing project from an Ant build to one using Maven.
i'm busy with a school project and I have to build a web app.
I am busy with a project for school where I use the InputDialogbox to
We are busy developing a Java web service for a client. There are two
Help I am busy making changes to a type library in a Datasnap project.
I am busy on a project that involves calling the API's of nine other
I'm busy on a small project to convert an Access2003 db to .NET. I
I am busy developing a chrome extension. What it will do: Get data from
A project I am busy on now requires many different kinds of stats, most
I am busy building a small theme options page for one of clients and

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.