Mysql Error 1166 Incorrect Column Name
What the heck does this mean? Here's the SQL I've got: CREATE TABLE `se_company_credit` ( `companycredit_id ` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `companycredit_credittype_id ` INT( 10 ) UNSIGNED NULL , `companycredit_company_id ` INT( 10 ) UNSIGNED NULL , `companycredit_expiry_date ` DATE NULL , `companycredit_value ` DECIMAL( 10, 0 ) NULL , INDEX ( `companycredit_credittype_id ` , `companycredit_company_id ` ) ) ENGINE = innodb Any help would be appreciated. Robert_2006 2008-10-05 22:30:02 UTC #2 maybe it's the extra space after the name causing trouble? companycredit_credittype_id seisner 2008-10-05 22:37:34 UTC #3 Never mind... it was the spaces after the column names! seisner 2008-10-05 22:40:39 UTC #4 Robert_2006 said: maybe it's the extra space after the name causing trouble? companycredit_credittype_id Thanks Robert! Yep! Mittineague 2014-09-24 23:04:57 UTC #5 Home Categories FAQ/Guidelines Terms of Service Privacy Policy Powered by Discourse, best viewed with JavaScript enabled Shop Versioning Reference Articles Premium
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like https://www.sitepoint.com/community/t/1166-incorrect-column-name/4308 you, helping each other. Join them; it only takes a minute: Sign up SQL Error(1166) : Incorrect column name 'id' up vote -2 down vote favorite 3 I am new to yii and heidiSQL while am creating new table i get this error,so help me to solve this error CREATE TABLE `users` ( `id ` INT(45) NULL, http://stackoverflow.com/questions/35628557/sql-error1166-incorrect-column-name-id `username ` VARCHAR(50) NULL, `pwd_hash` VARCHAR(50) NULL, `fname` VARCHAR(50) NULL, `lname` VARCHAR(50) NULL, `email` VARCHAR(50) NULL, `country` VARCHAR(50) NULL, `address` VARCHAR(50) NULL, `gender` VARCHAR(50) NULL, INDEX `PRIMARY KEY` (`id `), INDEX `UIQUE KEY` (`username `) ) COLLATE='latin1_swedish_ci' ENGINE=InnoDB ; I can't able to create new table in database. php mysql sql yii heidisql share|improve this question edited Mar 10 at 5:32 soniya Raj 117 asked Feb 25 at 13:23 Sandhiya C 248 why this down vote? –Sandhiya C Feb 25 at 13:50 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote accepted Spaces are not allowed at the end of column's definition, must be: CREATE TABLE `users` ( `id` INT(45) NULL, `username` VARCHAR(50) NULL, `pwd_hash` VARCHAR(50) NULL, `fname` VARCHAR(50) NULL, `lname` VARCHAR(50) NULL, `email` VARCHAR(50) NULL, `country` VARCHAR(50) NULL, `address` VARCHAR(50) NULL, `gender` VARCHAR(50) NULL, INDEX `PRIMARY KEY` (`id`), INDEX `UNIQUE KEY` (`username`) ) COLLATE='latin1_swedish_ci' ENGINE=InnoDB You have same error for username. share|improve this answer edited Feb 25 at 13:40 an
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: Newbie :: Error #1166 - Incorrect column name New Topic Advanced Search Error #1166 - Incorrect column name Posted by: Terry Broughton () Date: December 15, 2005 08:31AM http://forums.mysql.com/read.php?10,59858 I'm very new at putting tables in. I followed the documentation on how and what to put in to the table, but receive an error. CREATE TABLE `ticket` ( `ticketid ` INT( 12 ) NOT https://khdocs.wordpress.com/2015/06/25/mysql-error-code-1166-incorrect-column-name/ NULL AUTO_INCREMENT , `uspick1` INT( 5 ) NOT NULL , `uspick2` INT( 5 ) NOT NULL , `pick1` INT( 5 ) NOT NULL , `pick2` INT( 5 ) NOT NULL , `pick3` INT( 5 ) mysql error NOT NULL , `pick4` INT( 5 ) NOT NULL , `show1` INT( 1 ) NOT NULL , `show2` INT( 1 ) NOT NULL , `show3` INT( 1 ) NOT NULL , `show4` INT( 1 ) NOT NULL , `played` INT( 1 ) NOT NULL , `win` INT( 11 ) NOT NULL , `email` TEXT NOT NULL , `dayt` INT( 2 ) NOT NULL , PRIMARY KEY ( `ticketid ` ) ) mysql error 1166 TYPE = MYISAM MySQL said: #1166 - Incorrect column name 'ticketid Could someone help please...Thanks Navigate:Previous Message•Next Message Options:Reply•Quote Subject Written By Posted Error #1166 - Incorrect column name Terry Broughton 12/15/2005 08:31AM Re: Error #1166 - Incorrect column name Ralf Keller 12/15/2005 08:56AM Sorry, you can't reply to this topic. It has been closed. powered by phorum Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party. Contact Sales USA: +1-866-221-0634 Canada: +1-866-221-0634 Germany: +49 89 143 01280 France: +33 1 57 60 83 57 Italy: +39 02 249 59 120 UK: +44 207 553 8447 Japan: 0120-065556 China: 10800-811-0823 India: 0008001005870 More Countries» Contact Us Online» Products MySQL Enterprise Edition MySQL Standard Edition MySQL Classic Edition MySQL Cluster CGE MySQL Embedded (OEM/ISV) Services Training Certification Consulting Support Downloads MySQL Community Server MySQL Cluster MySQL Fabric MySQL Utilities MySQL Workbench About MySQL Contact Us How to Buy Partners Job Opportunities Site Map Documentation MySQL Reference Manuals MySQL Workbench Expert Guides Topic Guides MySQL Cluster Legal Legal Policies Your Privacy Rights Terms of Use Trademark Policy Contributor Agreement © 2015, Oracle Corporation and/or its affiliates
after the name causing trouble? 'company_type ' : the space after company_type column Never mind… it was the spaces after the column names!, only remove it , will work. to ‘company_type ‘ Share this:TwitterFacebookGoogleLike this:Like Loading... Related Post navigation Previous postERRORS in mysql displayed in language other than English. How to changeit?Next postError in import import net.proteanit.sql.DbUtils package innetbean Leave a Reply Cancel reply Enter your comment here... Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account. (LogOut/Change) You are commenting using your Twitter account. (LogOut/Change) You are commenting using your Facebook account. (LogOut/Change) You are commenting using your Google+ account. (LogOut/Change) Cancel Connecting to %s Notify me of new comments via email. Search Search for: Recent Posts Only variable references should be returned byreference Introduction to PHP |Speak Khmer(Part-1) Cannot add genymotion toeclipse WAMP server Icon is red after we setup newwindow. How to get id from URL incodeigniter? adding a class to form_submit in PHPCodeigniter How to Disable Automatic Update Check of IDM (Internet DownloadManager) សំណួរត្រៀមរូបវិទ្យា សម្រាប់ប្រលងគ្រូអនុ ២០១៤ (ឯកទេស គណិត-រូប /រូប-គីមី) Codeigniter path functionsdefinitions PHP Framework forbeginners Search for: HTML CSS JAVASCRIPT JQUERY PHP Pages គោលបំនង របៀបទាញយកនិងតំឡើង JDK,JRE ,Netbean ឆ្នាំទី ៤ ឆ្នាំទី ១ ឆ្នាំទី ២ ឆ្នាំទី៣ ទំនាក់ទំនង ទំព៍រដើម អំពីខ្ញុំ Constructor in PHP Some PHP 5 ArrayFunctions CSS Tutorial CSS/CSS3 File Manipulation in Javaprogramming HTML HTML Tutorial Introduction of Basic JavaSynta