SQL MySQL中不要再使用TYPE=InnoDB

阅读(2072)

创建table时的TYPE=InnoDB是一个过时的语法,从MySQL5.0起就不建议使用,以至于到后面彻底不再支持;需要采用ENGINE=InnoDB

The older term TYPE is supported as a synonym for ENGINE for backward compatibility, but ENGINE is the preferred term and TYPE is deprecated.

via:https://dev.mysql.com/doc/refman/5.0/en/using-innodb-tables.html

如果遇到下面的报错,就说明遇到了这个问题:

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=InnoDB' at line 15

via: http://stackoverflow.com/questions/5856511/how-to-setup-inno-db-in-mysql-5-5-8

标准语法:


CREATE TABLE customers (a INT, b CHAR (20), INDEX (a)) ENGINE=InnoDB;

Tags: mysql