PhpMyAdmin export does not include PRIMARY KEY as mysqldump

后端 未结 5 546
遇见更好的自我
遇见更好的自我 2021-02-08 20:06

Export of the struture of the same table with PhpMyAdmin:

`DROP TABLE IF EXISTS `test_apprentis`;
CREATE TABLE IF NOT EXISTS `test_apprentis` (
  `a_id` smallint         


        
5条回答
  •  我在风中等你
    2021-02-08 20:15

    I trapped myself as a novice! I have looked at the contents of the window displayed on the screen, without down vertical lift bar! Export by phpMyAdmin adds auto-incremented column information and PRIMARY KEY by ALTER TABLE queries after creating the table.

    DROP TABLE IF EXISTS `test_apprentis`;
    CREATE TABLE IF NOT EXISTS `test_apprentis` (
      `a_id` smallint(10) NOT NULL,
      `a_promo_id` smallint(11) NOT NULL,
      `a_cursus` smallint(10) DEFAULT NULL
    ) ENGINE=MyISAM AUTO_INCREMENT=3665 DEFAULT CHARSET=utf8;
    
    ALTER TABLE `test_apprentis`
      ADD PRIMARY KEY (`a_id`);
    
    ALTER TABLE `test_apprentis`
      MODIFY `a_id` smallint(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3665;
    

    Please accept my apologies for this silly question.

提交回复
热议问题