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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:06:35+00:00 2026-05-18T00:06:35+00:00

For a project we do the database design at the moment. We think we

  • 0

For a project we do the database design at the moment. We think we should use two auto_increment fields in one table.

table master:

`pid` int(10) NOT NULL auto_increment,
`iid` int(10) NOT NULL auto_increment,
...

To start with a alternate auto_incremet you can use ALTER TABLE tbl AUTO_INCREMENT = 100000; This will work only for the whole table ‘tbl’.
auto_increment for pid should be 50000000 and auto_increment for iid should be 80000000

We want to avoid splitting it into 3 tables with relations master -> table.pid and master -> table.iid.

altering the table is not working cause
/* SQL Error (1075): Incorrect table definition; there can be only one auto column and it must be defined as a key */

Is it possible or what alternative do you recommend?

  • 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-18T00:06:36+00:00Added an answer on May 18, 2026 at 12:06 am

    If you cannot use two auto columns I think you must redesign your database. What do you need exactly?

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

Sidebar

Related Questions

I'm using LINQ to SQL classes in a project where the database design is
I've been trying to design a database schema for a side project but I
I'm trying to build out a mysql database design for a project. The problem
I'm working on database designs for a project management system as personal project and
I'm working on a database project and I need to create Outlook 2007 plugin
I'm having to start building the architecture for a database project but i really
The Reporting Database in Project Server 2007 has about 7 User Views based on
Our project is held in a SourceSafe database. We have an automated build, which
In a recent project the lead developer designed a database schema where larger tables
I have a Rails project which has a Postgres database for the actual application

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.