CREATE TABLE `COMPETENCE_COURSE_DEPARTMENT` (
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `ACK_OPT_LOCK` int(11) default NULL,
  `KEY_COMPETENCE_COURSE` int(11) NOT NULL default '0',  
  `KEY_DEPARTMENT` int(11) NOT NULL default '0',    
  PRIMARY KEY  (`ID_INTERNAL`),
  UNIQUE KEY U1 (KEY_COMPETENCE_COURSE, KEY_DEPARTMENT),
  KEY `KEY_COMPETENCE_COURSE` (`KEY_COMPETENCE_COURSE`),
  KEY `KEY_DEPARTMENT` (`KEY_DEPARTMENT`)
) Type=InnoDB;