Results 1 to 5 of 5
  1. #1

    Lightbulb #1136 - Column count doesn't match value count at row 1


    hello all

    i would like to ask our moderators, as well, my fellow guest in here about the message i got after i issued a command.

    the scenario is i'm trying to insert data to an existing table but i got a result that says:


    #1136 - Column count doesn't match value count at row 1


    and this is the command i have issued in the Run SQL query/queries:


    INSERT INTO notes (
    `phone`
    )
    VALUES ( 72091, 73321, 73378, 112717)



    what is probably the cause of the error? and what is the right command i'm going to issue?


    cheers! ;->

  2. #2
    in your notes table, you specified one column only named 'phone', yet the number of columns you inserted in the VALUES does not match the number columns in the table.

    insert them 1 by 1 if yo are to insert that many.

  3. #3

    Lightbulb #1136 - Column count doesn't match value count at row 1

    Quote Originally Posted by ChaosOrb View Post
    in your notes table, you specified one column only named 'phone', yet the number of columns you inserted in the VALUES does not match the number columns in the table.

    insert them 1 by 1 if yo are to insert that many.

    hi ChaosOrb ..

    is their such a way i can do it then using only 1-parenthesis () separated only with comma (,)?

    i mean its gonna be very tiresome if i'll input it individually. good thing if its only like less than 10 numbers. but i'm sure come a time that above 10 numbers will be inputted into the systems.


    hoping to be assisted than ..


    cheers!

  4. #4
    Depends on your SQL database, you could do the batch inserts like this:
    Code:
    INSERT INTO notes (`phone`)
    VALUES ( 72091), (73321), (73378), (112717)

  5. #5
    is their such a way i can do it then using only 1-parenthesis () separated only with comma (,)?

    i mean its gonna be very tiresome if i'll input it individually. good thing if its only like less than 10 numbers. but i'm sure come a time that above 10 numbers will be inputted into the systems.
    Are you trying to say you want to add multiple rows with one insert statement?

    if sql server imo gamit pwede ani lang
    Code:
    INSERT INTO notes(phone)
    SELECT 72091
    UNION
    SELECT 73321
    UNION
    SELECT 73778
    UNION 
    SELECT 11271
    kung dli gani pwede rka mag specify ug "from" na keyword
    Tested this on oracle.
    Code:
    INSERT INTO notes(phone)
    SELECT 72091 FROM notes
    UNION
    SELECT 73321 FROM notes
    UNION
    SELECT 73778 FROM notes
    UNION 
    SELECT 11271  FROM notes
    Depending on what db your using some have different ways of supporting multiple row insert.

  6.    Advertisement

Similar Threads

 
  1. Sperm Count <- where and how much?
    By jasonrey in forum Fitness & Health
    Replies: 38
    Last Post: 07-22-2020, 07:09 PM
  2. HELP Love doesn't work on me at all.
    By lesterviper211 in forum "Love is..."
    Replies: 10
    Last Post: 04-19-2010, 01:10 AM
  3. Regarding Post Count
    By YJOB in forum Support Center
    Replies: 23
    Last Post: 10-09-2007, 10:03 AM
  4. TALISAY CITY VOTERS... pls enter here and be counted....
    By kentabs in forum Politics & Current Events
    Replies: 26
    Last Post: 04-23-2007, 10:49 AM
  5. Posts count not functioning in other categories?
    By nseven in forum Support Center
    Replies: 2
    Last Post: 03-30-2006, 06:36 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top