I created table and added all data in it but forgot to add foreign key what to do?
There is id column in both table one table consists primary key and second table consists related data but forgot to add foreign key and when I try to print all combined data it’s not working
>Solution :
So if you created Id column in both tables and you forgotten to add foreign key then you can basically use following query
Alter table table_child add foreign key(Id) references table_parent(Id)
You can add your table names at table_child and table_parent.
Hope this help you.