vendredi 19 août 2016

#1217 - Cannot delete or update a parent row: a foreign key constraint fails in PHPMyAdmin

I'm trying to make a database in PHPMyAdmin and I'm getting the error #1217 - Cannot delete or update a parent row: a foreign key constraint fails after I've already created the table. The code that I have is

drop table if exists tbl;

create table tbl(
name varchar(20) primary key,
pword char(30) not null,
mail varchar(50) not null
);

And I've tried it in MySQL Workbench and that's not giving me any errors at all when it runs

Aucun commentaire:

Enregistrer un commentaire