Faqts : Computers : Databases : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

41 of 72 people (57%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

Database: Relational: MySql: Error 1136 (21S01): Column count doesn't match value count at row 1

Sep 1st, 2009 23:03
khalid khalid, johnny deep, kaka vijes, games games, dman, Knud van Eeden, Simon Ndira, http://sturly.com http://www.jr7sa.com


----------------------------------------------------------------------
--- Knud van Eeden --- 22 May 2005 - 08:57 pm ------------------------
Database: Relational: MySql: Error 1136 (21S01): Column count doesn't 
match value count at row 1
---
http://www.jr7sa.com
http://www.jr7sa.com/msn
http://www.jr7sa.com/vb
http://www.jr7sa.com/1
http://o4serv.com
http://www.jr7sa.com/wordpress
http://www.jr7sa.com/nkt
http://www.jr7sa.com/chat
http://www.jr7sa.com/cam
http://www.jr7sa.com/newcaam
http://jr7sa.com/vb/f2.html
http://jr7sa.com/vb/f3.html
http://jr7sa.com/vb/f4.html
http://jr7sa.com/vb/f15.html
http://jr7sa.com/vb/f56.html
http://jr7sa.com/vb/f57.html
http://jr7sa.com/vb/f17.html
http://jr7sa.com/vb/f50.html
http://jr7sa.com/vb/f38.html
http://jr7sa.com/vb/f21.html
http://jr7sa.com/vb/f23.html
http://jr7sa.com/vb/f43.html
http://jr7sa.com/vb/f39.html
http://jr7sa.com/vb/f44.html
http://jr7sa.com/vb/f46.html
http://jr7sa.com/vb/f49.html
http://jr7sa.com/vb/f27.html
http://jr7sa.com/vb/f28.html
http://jr7sa.com/vb/f40.html
http://jr7sa.com/vb/f54.html
http://jr7sa.com/vb/cv_rss_feeds.php
http://www.jr7sa.com/vb/archive/index.php/
http://jr7sa.com/vb/f47.html
http://jr7sa.com/vb/f35.html
http://jr7sa.com/vb/external.php?type=RSS2
http://jr7sa.com/vb/jr7sa.com_vb_sitemap.xml
http://jr7sa.com/vb/sitemap.php
Possible cause:
The total amount of fields does not match
when trying to INSERT a value in a table.
---
e.g.
--- cut here: begin --------------------------------------------------
-----------------------------------------------
DROP TABLE IF EXISTS table1;
-----------------------------------------------
CREATE TABLE
 table1
(
 columnId INT AUTO_INCREMENT PRIMARY KEY,
 column1  VARCHAR( 50 ),
 column2  VARCHAR( 50 ),
 column3  VARCHAR( 50 )
)
;
-----------------------------------------------
-- inserting a value with correct 4 fields totally
INSERT INTO
 table1
VALUES
 ( 1, "test1", "test2", "test3" )
;
-----------------------------------------------
-- inserting a value with not correct 3 fields totally
INSERT INTO
 table1
VALUES
 ( 2, "test4", "test5" )
;
-----------------------------------------------
=> ERROR 1136 (21S01): Column count doesn't match value count at row 1
--- cut here: end ----------------------------------------------------
---
Possible solution:
Count the total amount of fields in the SQL query
INSERT statement, and correct this.
===
Note:
This could e.g. happen if you have a binary BLOB stored in a field in a
table, and then after say a backup you want to recreate your database
again. Maybe the binary information in the BLOB
field is not correctly read back into the database.
e.g. using copy/paste of an SQL query
If the length of the INSERTed information is too long, MySql might just
cut that off after a certain amount of
characters.
What you better do then is store the information in a file,
and read this information via
 source <your filename>;
===
Internet: see also:
---
Database: MySql: Command: Multiple: Execute: How to execute multiple 
commands at once in MySql?
http://www.faqts.com/knowledge_base/view.phtml/aid/36416/fid/52
---
Database: Relational: MySql: Link: Overview: Can you give an overview 
of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/35331/fid/52
----------------------------------------------------------------------
http://www.b2bgrant.com
http://www.pets-online.easyfindindia.com/
http://www.photography.pearlaction.com
http://www.photography.sariskas.com/
http://www.play-web-games.mundawar.com
http://www.realestate.easyfindindia.com/
http://www.real-estate.terrymart.com/
http://www.bigrockwell.com
http://www.schooltime.just2world.com/
http://www.seo-expert.life4style.com
http://www.software.furnimpact.com/
http://www.sports.indiaeduresults.com/
http://www.sports-in-india.easyfindindia.com/
http://www.srjgroup.slots12.com
http://www.teen-life.casinogametown.com/
http://www.top-beauty-tips.rajhealthcenter.com
http://www.travel.buxorgroup.com/
http://www.travel-guide.easyfindindia.com/
http://www.rockwellentertainments.com/
http://www.vehicles.realmaxor.com/
http://www.video-games.khairthal.com/
http://www.visual-arts.lgfsolution.com/
http://www.jforjewel.com
http://www.watch-online-free-cricket-match.indiatourpoint.com
http://www.weddings.furnimpact.com/
http://www.organizations.alwarmall.com/
http://www.Pet-for-Sale.jforjewel.com
http://www.pets.jestrugs.com/
http://www.office-products.sariskas.com/
http://www.pets.logicdunia.com/
http://www.propertybunch.com
http://www.buxorgroup.com
http://www.gsmrainbow.com
http://www.lgfsolution.com
http://www.nightroutes.com
http://www.monilek.com
http://www.mobile-computing.lgfsolution.com/
http://www.movies.promotioncrown.com/
http://www.music.a1start.com/
http://www.news-and-media.srplanet.com/
----------------------------------------------------------------------
===
Simon Ndira:
The feedback regarding this error is only helpful if there are very few
lines of record to update. I am trying to upload about 12.000 lines of
recrods affecting different tables that were edited in the course of
time. How can someone work around error 1136 in such an environment?
http://www.accounting.logicdunia.com/	
http://www.antiques-and-collectibles.b2bgrant.com/	
http://www.ask-an-expert.jestrugs.com/
http://www.arts.casinogametown.com/
http://www.arts.nightroutes.com/
http://www.beauty-products.a1start.com/
http://www.biotechnology.terrymart.com/
http://www.boating.sariskas.com/
http://www.books.buxorgroup.com/
http://www.logicdunia.com
http://www.just2world.com
http://www.promotioncrown.com	
http://www.casinogametown.com
http://www.indiaeduresults.com
http://www.realmaxor.com
http://www.a1start.com
http://www.alwarmall.com	
http://www.terrymart.com
http://www.rajasnet.com
http://www.khairthal.com
http://www.books.greatspido.com/
http://www.books.gsmrainbow.com/
http://www.boxing.a1start.com/
http://www.bpo.promotioncrown.com/
http://www.cad.gsmrainbow.com/
http://www.children.clarktimes.com/
http://www.coaching.furnimpact.com/
http://www.motorcycles.just2world.com/
http://www.movies.promotioncrown.com/
http://www.music.a1start.com/
http://www.music.onlineseosolution.com/
http://www.computers.propertybunch.com/
http://www.construction.monilek.com/
http://www.consultants.pearlaction.com
http://www.consumer-electronics.realmaxor.com/
http://www.cooking.terrymart.com/
http://www.mundawar.com
http://www.crafts.onlineseosolution.com/
http://www.customer-service.propertybunch.com/
http://www.cycling.habibstyle.com/
http://www.news-and-media.srplanet.com/
http://www.office-products.sariskas.com/
http://www.e-books.propertybunch.com/
http://www.onlineseosolution.com	
http://www.jestrugs.com
http://www.furnimpact.com
http://www.srplanet.com
http://www.greatspido.com
http://www.habibstyle.com
http://www.pearlaction.com	 
http://www.sariskas.com
http://www.events.monilek.com/
http://www.food.rajasnet.com/
http://www.furniture.greatspido.com/
http://www.gambling.logicdunia.com/
http://www.gardening.clarktimes.com/
http://www.gifts.srplanet.com/
http://www.health.realmaxor.com/
http://www.healthcare.onlineseosolution.com/
http://www.hockey.alwarmall.com/
http://www.holidays.clarktimes.com/
http://www.clarktimes.com