By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Records: 4 Duplicates: 0 Warnings: 0
id_f | fk_1 | fk_2 | column_F |
---|---|---|---|
1 | 1 | 1 | AA |
2 | 1 | 2 | BB |
3 | 1 | 2 | CC |
4 | 2 | 1 | DD |
Records: 3 Duplicates: 0 Warnings: 0
id_a | fk_1 | fk_2 |
---|---|---|
1 | 1 | 1 |
2 | 1 | 2 |
3 | 2 | 1 |
Cannot delete or update a parent row: a foreign key constraint fails (`fiddle`.`A`, CONSTRAINT `fk_idx` FOREIGN KEY (`fk_1`, `fk_2`) REFERENCES `F` (`fk_1`, `fk_2`))
Records: 0 Duplicates: 0 Warnings: 0
Records: 3 Duplicates: 0 Warnings: 0
id_f | fk_1 | fk_2 | column_F |
---|---|---|---|
1 | 1 | 1 | AA |
2 | 1 | 2 | BB |
4 | 2 | 1 | DD |
id_a | fk_1 | fk_2 |
---|---|---|
1 | 1 | 1 |
2 | 1 | 2 |
3 | 2 | 1 |