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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:51:25+00:00 2026-06-13T06:51:25+00:00

I executing this statement: CREATE TABLE test_mod SELECT * FROM `test` This copied a

  • 0

I executing this statement:

CREATE TABLE test_mod SELECT * FROM `test` 

This copied a table into the newly created table. Then I executed this:

INSERT INTO test_mod(`test_name`) SELECT `test_name` FROM test

That statement should have inserted more data to the newly created table. It did so, but the primary key are all 0?!?!

The I executed this statement:

ALTER TABLE test_mod MODIFY test_id INT UNSIGNED NOT NULL AUTO_INCREMENT 

And phpmyadmin told me that the column test_id has already an auto_increment attribute.. so how can I populate more data while having an auto increment functionality?

  • 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-06-13T06:51:27+00:00Added an answer on June 13, 2026 at 6:51 am

    Try

    CREATE TABLE test_mod LIKE test;
    INSERT INTO test_mod SELECT * FROM test;
    

    This will copy the table definition from “test” and insert all data from it into “test_mod”.

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

Sidebar

Related Questions

I'm getting a weird return when executing this query : SELECT * FROM rrp
When executing this simple SQL Delete statement, I'm getting a timeout from SQL Server:
Why is Django executing statements such as this: SELECT (1) AS [a] FROM [my_table]
Going off of this answer I am executing the below statements CREATE TABLE person
I am executing this statement under while (($data=fgetcsv($this->fin,5000,;))!==FALSE) Now what I want in else
Why is this script executing the string in the if statement: #!/bin/bash FILES=* STRING=''
Im getting data from a server by executing this code: - (void) sendGeneral:(NSString *)
How to set a bean property from jsf page before executing this f:event listener:
I have created a procedure in dynamic SQL which has a select statement and
I have JDBC code which inserts into a database table by executing a PreparedStatement.

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.