By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| Table | Create Table |
|---|---|
| t1 | CREATE TABLE `t1` ( `id` int DEFAULT NULL, KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| Table | Create Table |
|---|---|
| t2 | CREATE TABLE `t2` ( `id` int DEFAULT NULL, KEY `id` (`id`), CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |