Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

BUG - Error retrieving data when table has uniqe index

nbulusanjr@gmail.com posted 3 years ago in HeidiSQL portable
CREATE TABLE `companyschedulegroups` (
    `ID` INT(11) NOT NULL AUTO_INCREMENT,
    `CompanyID` INT(11) NOT NULL,
    `ScheduleGroupID` INT(11) NOT NULL,
    `DateCreated` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `DateLastUpdated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`ID`),
    UNIQUE INDEX `CompanyID` (`CompanyID`, `ScheduleGroupID`) USING BTREE,
    INDEX `ScheduleGroupID` (`ScheduleGroupID`)```


)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=22
;


INSERT INTO `companyschedulegroups` ( `CompanyID`, `ScheduleGroupID`, `DateCreated`, `DateLastUpdated`) VALUES ( '2', '11', '2016-10-18 00:00:00', '2016-10-18 00:00:00');
INSERT INTO `companyschedulegroups` ( `CompanyID`, `ScheduleGroupID`, `DateCreated`, `DateLastUpdated`) VALUES ( '1', '1', '2016-10-18 00:00:00', '2016-10-18 00:00:00');

Click the "Data" tab

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