Error 1064 Create Table
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and error 1064 mysql 42000 create table policies of this site About Us Learn more about Stack Overflow the mysql error 1064 create user company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags error 1064 mysqldump Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes sql error 1064 a minute: Sign up MySQL Create Table Error 1064 up vote 0 down vote favorite I am trying to create a table in MySQL but it doesn't want to play: create table traders( traderID INT(9) ZEROFILL NOT NULL AUTO_INCREMENT UNSIGNED, traderProfileName VARCHAR(64) NOT NULL, traderPassword CHAR(128) NOT NULL, traderFirstName VARCHAR(40) NOT NULL, traderSurname VARCHAR(40) NOT NULL, traderContactPhone VARCHAR(14) NOT NULL, locationPostCode
Error 1064 Sqlstate 42000
CHAR(4) NOT NULL, traderEmail VARCHAR(120) NOT NULL, traderBio VARCHAR(255) DEFAULT NULL, traderReviewRating DECIMAL(5,2) DEFAULT NULL, traderLastLogin DATETIME DEFAULT NULL, PRIMARY_KEY(traderID) ); And I am getting error: "ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNSIGNED, traderProfileName VARCHAR(64) NOT NULL, traderPassword CHAR(128) NOT ' at line 2" Is this something simple as I am using incorrect parameters for the table settings? mysql database share|improve this question edited May 29 at 15:46 wogsland 2,83181235 asked Oct 14 '13 at 19:27 Jonlee 1614 also unsigned is not a valid mysql type. Read the manual ! You have an invalid type and a typo. –Lorenz Meyer Feb 3 '15 at 9:16 add a comment| 4 Answers 4 active oldest votes up vote 0 down vote Auto increment is an integer by default, no need to define unsigned. http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html share|improve this answer answered Oct 14 '13 at 19:33 Tom Ron 742311 2 What if he wants the column to be UNSIGNED integer? &ndash
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and
Error 1064 Sqlstate 42000 (er_parse_error)
policies of this site About Us Learn more about Stack Overflow the error 1064 you have an error in your sql syntax company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users error 1064 mysql workbench Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes http://stackoverflow.com/questions/19367752/mysql-create-table-error-1064 a minute: Sign up MySQL error 1064 creating table up vote 1 down vote favorite Trying to create a table with two foreign keys and keep getting this error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'idbed MEDIUMINT UNSIGNED NOT NULL, http://stackoverflow.com/questions/28067915/mysql-error-1064-creating-table idnumber MEDIUMINT UNSIGNED NOT NULL,' at line 2 The table is: CREATE TABLE care( idbed MEDIUMINT UNSIGNED NOT NULL, idnumber MEDIUMINT UNSIGNED NOT NULL, PRIMARY KEY(idbed, idnumber), FOREIGN KEY(idbed) REFERENCES intensivecarebed(idbed) FOREIGN KEY(idnumber) REFERENCES employee(idnumber)); the other two tables are: CREATE TABLE Employee( first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, address VARCHAR(60) NOT NULL, salary FLOAT UNSIGNED NOT NULL, specialization VARCHAR(50) NOT NULL< clinic_name VARCHAR(50) NOT NULL, PRIMARY KEY(idnumber) ); CREATE TABLE intensivecarebed( idbed MEDIUMINT UNSIGNED NOT NULL, clinic_name VARCHAR(50) NOT NULL, tax_reg_number TINYINT(10) UNSIGNED NOT NULL, PRIMARY KEY(idbed) ); Anybody insights? mysql sql mysql-error-1064 share|improve this question edited Jan 21 '15 at 13:31 rtruszk 3,408132242 asked Jan 21 '15 at 13:02 Ioanna Otinanai 83 Ther is some syntax error in the following line: specialization VARCHAR(50) NOT NULL< < should be replaced by ',' in the first create After correcting this syntax error, i executed this sccript in my MySQL server it went ok... –ASNAOUI Ayoub Jan 21 '15 at 13:09 specialization VARCHAR(50) NOT NULL< one < which must be ,. Don't you need idnumber MEDIUMINT UNS
log in tour help Tour Start 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 http://dba.stackexchange.com/questions/34076/creating-table-syntax-error-1064 this site About Us Learn more about Stack Overflow the company Business http://www.inmotionhosting.com/support/website/database-troubleshooting/error-1064 Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only error 1064 takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top creating table syntax error 1064 up vote 2 down vote favorite I'm using workbench to create a table. This script is giving me a problem. It is saying that there is a syntax error new '). error 1064 mysql DROP TABLE IF EXISTS `waitronmain`.`managers` ; CREATE TABLE IF NOT EXISTS `waitronmain`.`managers` ( `manager_id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR(45) NOT NULL , `email` VARCHAR(45) NOT NULL , `password` VARCHAR(45) NOT NULL , `restaurant` VARCHAR(45) NOT NULL , `location` VARCHAR(45) NULL , PRIMARY KEY (`manager_id`) ) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `waitronmain`.`waiters` -- ----------------------------------------------------- DROP TABLE IF EXISTS `waitronmain`.`waiters` ; CREATE TABLE IF NOT EXISTS `waitronmain`.`waiters` ( `waiter_id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR(45) NOT NULL , `password` VARCHAR(45) NOT NULL , PRIMARY KEY (`waiter_id`) , INDEX `manager_id` () , CONSTRAINT `manager_id` FOREIGN KEY () REFERENCES `waitronmain`.`managers` () ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; The line causing the problem is this: INDEX `manager_id` () , Any ideas? I'm at a loss, the code was generated from an ERD model I made within Workbench so I'm suprised it has a syntax error at all. I got this error code when executing: Error Code: 1064 You have an error in your SQL syntax mysql mysql-workbench share|improve this question edited Feb 4 '13 at 17:15 bluefeet♦ 6,05522255 asked Feb 4 '13 at 16:18 Javacadabra
DOMAINS WEB DESIGN WEB DESIGN SERVICES CREATE YOUR OWN WEBSITE SITE HOSTING TOOLS MEET US MEET US ABOUT US PARTNERS & AWARDS BLOG WE'RE HIRING CONTACT US AMP LOGIN SUPPORT CENTER Search Support Center Product Guides Dedicated Hosting Reseller Hosting KnowledgeBase Website Email Domain Names Reseller Billing Community Support Browse Questions Ask a Question User Submitted Articles Education Channels Android BoldGrid cPanel DokuWiki Drupal 7 Drupal 8 Everything Email Joomla 2.5 Joomla 3.1 K2 Magento 1.6 Mambo MediaWiki Moodle Movable Type OpenCart OpenCart 2.0 osCommerce PHP-Fusion PHP-Nuke phpBB phpList Premium Website Builder PrestaShop 1.5 PrestaShop 1.6 SMF Tiki Wiki VirtueMart 3 Web Hosting Manager Website Design WordPress Tools & Resources Email Configuration Blacklist Check Visual DNS Lookup Quick Tagger Icon Sets Favicon Generator Bounce Back Parser What is my IP address? >>Website .htaccess (17)Adobe Flash (2)APIs (2)Backup and Restore (15)Billing (8)Browser Issues (2)Connecting to a Database (5)cPanel (26)cPanel Account Management (16)Cron Jobs (4)Cube Cart (2)Database Setup (5)Database Troubleshooting (6)Domain Management (2)Dreamweaver (12)Drush (2)eCommerce (7)Elasticsearch (4)Fantastico (4)File Management (16)File Manager (6)FTP (10)FTP Client Setup (21)General Server Setup / Management (15)Getting Started Guides (18)Ghost (3)Google Tools (21)How To (23)HTML (2)Image Editing (2)IP Addresses (3)iWeb (1)JavaScript (2)Joomla (10)Joomla 2.5 (36)Koken (11)Linux (27)Logaholic (5)Magento (2)Maintaining Your Website (1)Managing Files (7)Microsoft FrontPage (11)Microsoft Publisher (1)ModSecurity (7) MODx (3)New Customers (7)Open Classifieds (1)PCI Compliance (7)PHP (15)PHP Configuration (7)PHP Troubleshooting (6)phpBB (25)phpMyAdmin (10)Premium Website Builder (22)Prestashop (1)Protecting Files (5)Publishing Your Site (2)Python (1)Redirects (4)Restricting Bots (5)Search Engine Optimization (1)Secure Socket Layer (SSL) Tutorials (13)Security (12)Sending Email From Websites (2)Server Security (2)Server Usage (21)Slow Websites (7)Social Media (4)Software FAQs (11)Soho Web Builder (18)SSH and Root access (21)Statistics/Logging (12)Troubleshooting Comment Spam (3)Troubleshooting Hacked Websites (9)Web Host Manager (7)Website Error Numbers (4)Website Is Unavailable (3)Website Transfers (6)Website Troubleshooting (26)Welcome to AMP (22)What Is... (9)WooCommerce (5