Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
Created September 8, 2022 23:52
Show Gist options
  • Select an option

  • Save codigoconjuan/8b5f122a179a17730ffe0146d721ab50 to your computer and use it in GitHub Desktop.

Select an option

Save codigoconjuan/8b5f122a179a17730ffe0146d721ab50 to your computer and use it in GitHub Desktop.
Relación N:N de Eventos y Registros
CREATE TABLE `eventos_registros` (
`id` int NOT NULL AUTO_INCREMENT,
`evento_id` int DEFAULT NULL,
`registro_id` int DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `evento_id` (`evento_id`),
KEY `registro_id` (`registro_id`),
CONSTRAINT `eventos_registros_ibfk_1` FOREIGN KEY (`evento_id`) REFERENCES `eventos` (`id`),
CONSTRAINT `eventos_registros_ibfk_2` FOREIGN KEY (`registro_id`) REFERENCES `registros` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment