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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:54:28+00:00 2026-06-03T04:54:28+00:00

Mysql table (migration_terms) fields are as follows oldterm count newterm seed I used the

  • 0

Mysql table (migration_terms) fields are as follows

oldterm   count    newterm  seed

I used the following create table statment.

CREATE TABLE `migration_terms` 
    ( 
      `oldterm` varchar(255) DEFAULT NULL, 
      `count` smallint(6) DEFAULT '0', 
      `newterm` varchar(255) DEFAULT NULL, 
      `seed` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`seed`) 
    )   ENGINE=InnoDB DEFAULT CHARSET=utf8

And It works, no problems there.

but then when I used the following insert into statement to populate it;

"INSERT INTO migration_terms 
     SELECT looseterm as oldterm, 
            COUNT(seed) AS count 
            FROM looseterms 
            GROUP BY looseterm 
            ORDER BY count DESC "

I get this error;

 Column count doesn't match value count at row 1

I cannot figure out why?

If you need the table structure of the looseterms table, it was created by the following create table statement.

CREATE TABLE looseterms
(
     `seed` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
     `looseterm` varchar(255)
)
  • 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-03T04:54:30+00:00Added an answer on June 3, 2026 at 4:54 am

    You need to specify the columns if your select statement has fewer columns than the table

    "INSERT INTO migration_terms 
            (oldterm, 
             count) 
    SELECT looseterm   AS oldterm, 
           Count(seed) AS count 
    FROM   looseterms 
    GROUP  BY looseterm 
    ORDER  BY count DESC  "
    

    From MySql docs on Insert Syntax

    If you do not specify a list of column names for INSERT … VALUES or
    INSERT … SELECT, values for every column in the table must be
    provided by the VALUES list or the SELECT statement. If you do not
    know the order of the columns in the table, use DESCRIBE tbl_name to
    find out.

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

Sidebar

Related Questions

My MySQL table is simple. I have 3 fields: an index a url a
In this MySQL table definition: CREATE TABLE groups ( ug_main_grp_id smallint NOT NULL default
I have a MySQL table with the following data (simplified): INSERT INTO `stores` (`storeId`,
I have the following MySQL table structure: num field company phone website 1 Gas
I have a MySQL table with a column of well-formed URLs. I'd like to
I have a MySQL table that holds many entries with repeated IDs (for various
I have a MySql table called reviews which stores a lot of product reviews,
I have a huge MySQL table which has its rows encoded in UTF-8 twice.
I have a MySQL table with an autoincremented id column. The id started from
If I'm adding a column via MySQL, I can specify where in the table

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.