Get the App
SLTechnology News&Howtos  ›  Database  › 

Why does MGR need to use primary keys

Shulou Source: shulou.com Published: 2022-06-01 17:36:57 11月13日 Update

Why does MGR need to use primary keys? In order to solve this problem, the editor summarizes this article about MGR table today, hoping to help more friends who want to solve this problem to find a more simple and easy way.

Validating the MGR schema table requires a primary key, otherwise inserting data will report an error.

Mysql > show tables

+-+ | Tables_in_dd | +-+ | a | +-+ 1 row in set (0.00 sec) mysql > desc a +-+ | Field | Type | Null | Key | Default | Extra | +-+-+ | id | int (11) | YES | | NULL | | +-+-+ 1 row in set (0.00 sec) mysql > insert into a values (1) ERROR 3098 (HY000): The table does not comply with the requirements by an external plugin.mysql > alter table an add primary key (id); Query OK, 0 rows affected (0.02 sec) Records: 0 Duplicates: 0 Warnings: 0mysql > desc a +-+ | Field | Type | Null | Key | Default | Extra | +-+-+ | id | int (11) | NO | PRI | NULL | | +-+-+ 1 row in set (0.01sec) mysql > insert into a values (1) Query OK, 1 row affected (0. 00 sec) mysql > insert into a values (1); Query OK, 1 row affected (0. 00 sec) mysql > select * from a Tantra Kui Kui + | id | +-- + | 1 | +-+ 1 row in set (0. 00 sec)

After reading the above, do you have a general idea of why MGR schema tables need to use primary keys? If you want to know more about the content of the article, welcome to follow the industry information channel, thank you for reading!

Tags: Content articles more framework problems easy to do easy to do methods reasons data friends industry information information channels channels will report help related verification Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux MariaDB OPPO Reno Shulou Tech Info Apple