1

please could someone tell me the problem with this syntax because mysql 5.5.32 keeps tell me about an error

CREATE TABLE `clients` (
    `ID` tinyint(11) NOT NULL auto_increment,
    `title` varchar(10) NOT NULL default '',
    `firstName` varchar(30) NOT NULL default '',
    `lastName` varchar(30) NOT NULL default '',
    `address1` varchar(100) NOT NULL default '',
    `address2` varchar(100) NOT NULL default '',
    `town` varchar(100) NOT NULL default '',
    `province` varchar(100) NOT NULL default '',
    `country` varchar(40) NOT NULL default '',
    `postCode` varchar(20) NOT NULL default '',
    `telephone` varchar(20) NOT NULL default '',
    `email` varchar(100) NOT NULL default '',
    `cardNo` varchar(16) NOT NULL default '0000-00-00',
    `expiryDate` date NOT NULL default '0000-00-00',
    PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='customer table' AUTO_INCREMENT=1 ;
2
  • I tried his question. And error message was 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 'TYPE=MyISAM COMMENT='customer table' AUTO_INCREMENT=1' at line 17 Commented Nov 12, 2013 at 3:54
  • #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 'TYPE=MyISAM COMMENT='customer table' AUTO_INCREMENT=1' at line 31 Commented Nov 12, 2013 at 3:58

2 Answers 2

1

The keyword TYPE has been replaced by ENGINE as in

ENGINE=MyISAM
Sign up to request clarification or add additional context in comments.

Comments

1

change TYPE to ENGINE like this:

CREATE TABLE `clients` (
    `ID` tinyint(11) NOT NULL auto_increment,
    `title` varchar(10) NOT NULL default '',
    `firstName` varchar(30) NOT NULL default '',
    `lastName` varchar(30) NOT NULL default '',
    `address1` varchar(100) NOT NULL default '',
    `address2` varchar(100) NOT NULL default '',
    `town` varchar(100) NOT NULL default '',
    `province` varchar(100) NOT NULL default '',
    `country` varchar(40) NOT NULL default '',
    `postCode` varchar(20) NOT NULL default '',
    `telephone` varchar(20) NOT NULL default '',
    `email` varchar(100) NOT NULL default '',
    `cardNo` varchar(16) NOT NULL default '0000-00-00',
    `expiryDate` date NOT NULL default '0000-00-00',
    PRIMARY KEY  (`ID`)
) ENGINE=MyISAM COMMENT='customer table' AUTO_INCREMENT=1 ;

MySQL 5.0 accepts TYPE or ENGINE, but above MySQL 5.1, Only ENGINE is allowed.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.