MySQL Forums
Forum List  »  Newbie

Re: SELECT mit NOT EXISTS
Posted by: Hans Huber
Date: May 13, 2020 07:13PM

Hi Peter,

sorry I exported the wrong tables. Its not the group once its the detail once, so here are the right tables:

CREATE TABLE `person` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`vmSpenderNr` int(10) DEFAULT NULL,
`titel` varchar(250) DEFAULT NULL,
`name` varchar(250) NOT NULL,
`vorname` varchar(250) DEFAULT NULL,
`foto` varchar(250) DEFAULT NULL,
`tag` int(10) DEFAULT NULL,
`monat` int(10) DEFAULT NULL,
`jahr` int(10) DEFAULT NULL,
`zeitstempel` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=557 DEFAULT CHARSET=utf8

this one is the group table
CREATE TABLE `detail` (
`IDdetail` int(11) NOT NULL AUTO_INCREMENT,
`detail` varchar(250) NOT NULL,
PRIMARY KEY (`IDdetail`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8


this one is the assignment table
CREATE TABLE `detailzuordnung` (
`zuordnungID` int(255) NOT NULL AUTO_INCREMENT,
`person_id` int(255) NOT NULL,
`detail_id` int(255) NOT NULL,
`status` int(11) DEFAULT NULL,
`zeitstempel` int(255) NOT NULL,
PRIMARY KEY (`zuordnungID`),
KEY `connect_person` (`person_id`),
KEY `connect_detail` (`detail_id`),
CONSTRAINT `connect_detail` FOREIGN KEY (`detail_id`) REFERENCES `detail` (`IDdetail`) ON DELETE CASCADE,
CONSTRAINT `connect_person` FOREIGN KEY (`person_id`) REFERENCES `person` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1280 DEFAULT CHARSET=utf8

Options: ReplyQuote


Subject
Written By
Posted
May 13, 2020 08:53AM
May 13, 2020 06:01PM
Re: SELECT mit NOT EXISTS
May 13, 2020 07:13PM
May 14, 2020 05:57PM
May 19, 2020 10:11AM
May 20, 2020 09:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.