解決 MySQL 錯誤“TYPE=MyISAM”?


若要修復錯誤,僅需將 TYPE 替換為 ENGINE。設定引擎的語法如下 −

ENGINE = MyISAM;

使用 TYPE 時會發生 MySQL 錯誤。讓我們在建立表時看一下相同的場景 −

mysql> create table Customers
   −> (
   −> CustomerId int,
   −> CustomerName varchar(200)
   −> )TYPE = MyISAM;

錯誤如下 −

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' at line 5

若要解決以上錯誤,將 TYPE 替換為 ENGINE,如下所示 −

mysql> create table Customers
   −> (
   −> CustomerId int,
   −> CustomerName varchar(200)
   −> )ENGINE = MyISAM;
Query OK, 0 rows affected (0.24 sec)

MySQL 中的“ENGINE = MyISAM”已更新成功。

更新於: 2019 年 7 月 30 日

1K+ 檢視

開啟你的職業

透過完成課程獲得認證

開始
廣告
© . All rights reserved.