Home >Database >Mysql Tutorial >Why Am I Getting a 1064 Error When Creating a MySQL Table with the TYPE Option?

Why Am I Getting a 1064 Error When Creating a MySQL Table with the TYPE Option?

Susan Sarandon
Susan SarandonOriginal
2024-12-11 18:30:12375browse

Why Am I Getting a 1064 Error When Creating a MySQL Table with the TYPE Option?

1064 Error in CREATE TABLE Due to Deprecated TYPE Syntax

When executing a CREATE TABLE query, an error may occur if the TYPE option is present. This option was synonymous with ENGINE, but has since been deprecated in MySQL 4.0 and removed in MySQL 5.5.

Solution:

To resolve this issue, replace the TYPE option with ENGINE. For example, instead of:

CREATE TABLE dave_bannedwords(
  ...
  TYPE = MYISAM
);

Use:

CREATE TABLE dave_bannedwords(
  ...
  ENGINE = MyISAM
);

This will ensure that the table is created with the desired storage engine.

The above is the detailed content of Why Am I Getting a 1064 Error When Creating a MySQL Table with the TYPE Option?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn