I have three tables in mysql database with the name of adduser
, academic_record
and admission
, all tables have same column name std_id
same date type
, both tables academic_record
and admission
is linked with foreign key the column of std_id
on adduser
.
Now when i delete data from adduser, i found error that cannot be add or deleted... foreign constraint add.. can any one give me the solution I use this query for foreign key
alter table academic_record
add foregn key constraint fk_peracademic_record
where academic_record(std_id)
references adduser(std_id);