--
-- Host: localhost    Database: Dozenten
-- ------------------------------------------------------


--
-- Table structure for table `t_table`
--

CREATE TABLE `t_table` (
  `column01` int(11) NOT NULL AUTO_INCREMENT,
  `column02` varchar(10) NOT NULL DEFAULT '',
  `column03` char(3) NOT NULL DEFAULT '',
  `column04` int(11) DEFAULT NULL,
  `column05` int(10) DEFAULT NULL,
  `column06` varchar(20) NOT NULL DEFAULT '',
  `column07` double(10,2) NOT NULL DEFAULT 0.00,
  `column08` varchar(20) NOT NULL DEFAULT '',
  `column09` varchar(50) NOT NULL DEFAULT '',
  `column10` varchar(50) NOT NULL DEFAULT '',
  `column11` date NOT NULL DEFAULT '0000-00-00',
  `column12` date NOT NULL DEFAULT '0000-00-00',
  `column13` varchar(50) NOT NULL DEFAULT '',
  `column14` varchar(10) NOT NULL DEFAULT '',
  `column15` varchar(10) NOT NULL DEFAULT '',
  `column16` varchar(10) NOT NULL DEFAULT '',
  `column17` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `column18` varchar(25) NOT NULL DEFAULT '',
  `column19` date NOT NULL DEFAULT '0000-00-00',
  `column20` double(14,4) NOT NULL DEFAULT 0.0000,
  `column21` double(10,2) NOT NULL DEFAULT 0.00,
  `column22` double(10,2) NOT NULL DEFAULT 0.00,
  `column23` char(1) NOT NULL DEFAULT 'N',
  `column24` int(10) NOT NULL DEFAULT 0,
  `column25` varchar(50) DEFAULT '0',
  `column26` int(10) NOT NULL DEFAULT 0,
  `column27` varchar(80) NOT NULL DEFAULT '',
  `column28` varchar(4) DEFAULT NULL,
  `column29` varchar(15) DEFAULT NULL,
  `column30` int(11) DEFAULT NULL,
  `column31` int(10) NOT NULL DEFAULT 0,
  `column32` varchar(25) DEFAULT NULL,
  `column33` varchar(2) DEFAULT NULL,
  `column34` varchar(4) DEFAULT NULL,
  `column35` int(10) DEFAULT NULL,
  `column36` varchar(15) DEFAULT NULL,
  `column37` int(11) DEFAULT NULL,
  `column38` date NOT NULL DEFAULT '0000-00-00',
  `column39` date NOT NULL DEFAULT '0000-00-00',
  `column40` int(11) DEFAULT NULL,
  `column41` int(11) DEFAULT NULL,
  `column42` int(11) DEFAULT NULL,
  `column43` datetime DEFAULT NULL,
  `column44` varchar(255) DEFAULT NULL,
  `column45` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`column01`),
  KEY `column02` (`column02`),
  KEY `column04` (`column04`),
  KEY `column06` (`column06`),
  KEY `column17` (`column17`),
  KEY `column18` (`column18`),
  KEY `column19` (`column19`),
  KEY `column24` (`column24`),
  KEY `column26` (`column26`),
  KEY `column27` (`column27`),
  KEY `column29` (`column29`),
  KEY `column11` (`column11`),
  KEY `column30` (`column30`),
  KEY `column31` (`column31`),
  KEY `column28` (`column28`),
  KEY `column05` (`column05`),
  KEY `column35` (`column35`),
  KEY `column37` (`column37`),
  KEY `column13` (`column13`) USING BTREE,
  CONSTRAINT `fk_xxx_xxx` FOREIGN KEY (`column05`) REFERENCES `xxx`.`xxx` (`xxx`) ON UPDATE CASCADE,
  CONSTRAINT `fk_xxx_xxx` FOREIGN KEY (`column04`) REFERENCES `xxx`.`xxx` (`xxx`),
  CONSTRAINT `fk_xxx_xxx` FOREIGN KEY (`column30`) REFERENCES `xxx`.`xxx` (`xxx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`xxx`@`127.0.0.1`*/ /*!50003 TRIGGER `xxx`.`xxx_BEFORE_UPDATE` BEFORE UPDATE ON `t_table` FOR EACH ROW
BEGIN

	If (New.column38 <> "0000-00-00") Then

		Update xxx.xxx l
		SET l.locked = 1
		WHERE l.Id = OLD.column41;

	END IF;

END */;;
DELIMITER ;


