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
Release: 2024-12-11 18:30:12
Original
308 people have browsed it

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
);
Copy after login

Use:

CREATE TABLE dave_bannedwords(
  ...
  ENGINE = MyISAM
);
Copy after login

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!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template