I need to create a unique constrains for my table which has date time but i need to make mid and date from createdttm as unique . Here is my table structure
CREATE TABLE IF NOT EXISTS `sampletable` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`mid` varchar(50) DEFAULT NULL,
`category` varchar(50) DEFAULT NULL,
`createdttm` datetime DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31826 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;