English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
لإنشاء جدول MySQL باستخدام محرك MyISAM، يمكنك استخدام الأمر ENGINE. دعنا أولاً ننشئ جدولاً باستخدام الأمر CREATE.
mysql> create table StudentRecordWithMyISAM -> ( -> Id int, -> StudentName varchar(100), -> StudentAge int -> ENGINE=MyISAM;
فيما فوق، قمنا بضبط المحرك على "MyISAM".
للتحقق من عدد الأعمدة في الجدول، استخدم الأمر DESC.
mysql> DESC StudentRecordWithMyISAM;
هذا هو الناتج.
+-------------+--------------+------+-----+---------+-------+ | الحقل | النوع | لا يوجد قيمة | مفتاح | افتراضي | إضافي | +-------------+--------------+------+-----+---------+-------+ | Id | int(11) | YES | | NULL | | | StudentName | varchar(100) | YES | | NULL | | | StudentAge | int(11) | YES | | NULL | | +-------------+--------------+------+-----+---------+-------+ 3 rows in set (0.00 sec)
تحقق مما إذا كان الجدول يقدم مع MyISAM.
mysql> SHOW TABLE STATUS FROM business LIKE 'StudentRecordWithMyISAM';
هذا هو الت输出 الذي يبين بوضوح أن المحرك هو MyISAM.
+-------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +-------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+ | studentrecordwithmyisam | MyISAM | 10 | Dynamic | 0 | 0 | 0 | 281474976710655 | 1024 | 0 | 1 | 2018-10-22 15:47:01 | 2018-10-22 15:47:02 | NULL | utf8mb4_unicode_ci | NULL | | | +-------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+ 1 row in set (0.14 sec)
تحقق من وجود جدول MyISAM.
mysql> SELECT TABLE_NAME, -> ENGINE -> FROM information_schema.TABLES -> WHERE TABLE_SCHEMA = 'business' and ENGINE = 'MyISAM';
هذا هو الناتج.
+-------------------------+--------+ | TABLE_NAME | ENGINE | +-------------------------+--------+ | studentrecordwithmyisam | MyISAM | +-------------------------+--------+ 1 row in set (0.00 sec)