comment data lost

[expired user #8930]'s profile image [expired user #8930] posted 9 years ago in General Permalink
HeidiSQL\9.2

right side [Table list]
Name ... Comment
mytable ... 3

double click it enter Edit. the Comment is empty but not '3'
ansgar's profile image ansgar posted 9 years ago Permalink
Please paste the CREATE TABLE code here, which you see in the "Create code" tab.
[expired user #4370]'s profile image [expired user #4370] posted 6 years ago Permalink

my table:

CREATE TABLE t_team ( Team_ID INT(11) NOT NULL AUTO_INCREMENT COMMENT 'Team_ID', TeamName VARCHAR(50) NOT NULL DEFAULT '-' COMMENT 'TeamName', TeamCode VARCHAR(32) NOT NULL DEFAULT '-' COMMENT 'TeamCode', Dept_ID INT(11) NOT NULL DEFAULT '1' COMMENT 'Dept_ID', Enabled TINYINT(4) NOT NULL DEFAULT '1' COMMENT 'Enabled', PRIMARY KEY (Team_ID), INDEX Idx_Dept_ID (Dept_ID) ) COMMENT='team info' COLLATE='utf8_general_ci' ENGINE=MyISAM AUTO_INCREMENT=1

Dept_ID COMMENT and Enabled COMMENT lost. DEFAULT value lost too.

[expired user #4370]'s profile image [expired user #4370] posted 6 years ago Permalink
CREATE TABLE `t_team` (
    `Team_ID` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'Team_ID',
    `TeamName` VARCHAR(50) NOT NULL DEFAULT '0' COMMENT 'TeamName',
    `TeamCode` VARCHAR(32) NOT NULL DEFAULT '0' COMMENT 'TeamCode',
    `Dept_ID` INT(11) NOT NULL DEFAULT '',
    `Enabled` TINYINT(4) NOT NULL DEFAULT '',
    PRIMARY KEY (`Team_ID`),
    INDEX `Idx_Dept_ID` (`Dept_ID`)
)
COMMENT='team info'
COLLATE='utf8_general_ci'
ENGINE=MyISAM
;
[expired user #4370]'s profile image [expired user #4370] posted 6 years ago Permalink

this is heidisql generate code.

[expired user #4370]'s profile image [expired user #4370] posted 6 years ago Permalink

mycode:

CREATE TABLE `t_team` (
    `Team_ID` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'Team_ID',
    `TeamName` VARCHAR(50) NOT NULL DEFAULT '-' COMMENT 'TeamName',
    `TeamCode` VARCHAR(32) NOT NULL DEFAULT '-' COMMENT 'TeamCode',
    `Dept_ID` INT(11) NOT NULL DEFAULT '1' COMMENT 'Dept_ID',
    `Enabled` TINYINT(4) NOT NULL DEFAULT '1' COMMENT 'Enabled',
    PRIMARY KEY (`Team_ID`),
    INDEX `Idx_Dept_ID` (`Dept_ID`)
)
COMMENT='team info'
COLLATE='utf8_general_ci'
ENGINE=MyISAM
AUTO_INCREMENT=1

Please login to leave a reply, or register at first.