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 4094902
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:48:44+00:00 2026-05-20T19:48:44+00:00

Is it possible in MySQL to set the starting value of a primary key

  • 0

Is it possible in MySQL to set the starting value of a primary key index, so it starts at say 15 instead of 1?

A quick hack would be to write a loop of 14 junk entries, add the correct data then delete the first 14 entries but I would be interested to know if it is possible in a neater way!

The reason for doing this is the overhaul of an existing site where indexes don’t all start at 1 but they are used to link items in different tables

  • 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-20T19:48:45+00:00Added an answer on May 20, 2026 at 7:48 pm

    Yes, the auto increment start position can be changed by altering the table.

    ALTER TABLE t AUTO_INCREMENT = ?;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to set constraints for VARCHAR columns in MySQL? I would like
Possible Duplicate: MySQL: Reorder/Reset auto increment primary key? I have an auto increment field
Is it possible in MySQL to select from a static set of integers? Given
Possible Duplicate: How can I set a maximum number of rows in MySQL table?
Is this possible in mysql? update table1 set column1 = (select column1 from table2
Possible Duplicate: Mysql Select Enum Values I have set up a coloumn in Mysql
In mysql I can set default value for column like this: ALTER TABLE <Table>
Possible Duplicate: SET NAMES utf8 in MySQL? I am writing PHP to connect to
Possible Duplicate: python fabric mysql privileges Trying to set mysql user privileges with fabric.
Is it possible to set mySQL to have a saturday as the start of

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.