如何在heidisql中将唯一索引更改为非唯一索引?

时间:2015-11-03 14:29:08

标签: mysql

在下面的查询中,我需要使用IMEI_CODEREGISTRATION_IDunique index non unique index更改为alter query。如何实现

CREATE TABLE `ringee_user` (
    `RINGEE_USER_ID` BIGINT(20) NOT NULL,
    `USER_NAME` VARCHAR(40) NOT NULL,
    `IMEI_CODE` VARCHAR(45) NOT NULL,
    `REGISTRATION_ID` VARCHAR(200) NOT NULL,
    `MOBILE_NUMBER` VARCHAR(14) NOT NULL,
    `CREATED_DTTM` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `MODIFIED_DTTM` TIMESTAMP NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
    `IS_DELETE` TINYINT(1) NULL DEFAULT '0',
    PRIMARY KEY (`RINGEE_USER_ID`),
    UNIQUE INDEX `REG_ID_UNIQUE` (`REGISTRATION_ID`),
    UNIQUE INDEX `MOBILE_NUMBER_UNIQUE` (`MOBILE_NUMBER`),
    UNIQUE INDEX `IMEI_CODE_UNIQUE` (`IMEI_CODE`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

ALTER TABLE `ringee_user`
    CHANGE COLUMN `IS_DELETE` `IS_DELETE` TINYINT(1) NULL DEFAULT '0' AFTER `MOBILE_NUMBER`;

0 个答案:

没有答案