SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE <TABLE_NAME> ADD FOREIGN KEY (COLUMN_NAME) REFERENCES TABLE_NAME(id)
Eg - Alter table vivagame11.matches add foreign key (leagueid) references vivagame11.league(id)
This blog is made specially for students those who have selected Computer Application (165) as a subject in CBSE board exam. It includes chapter wise notes, videos, assignments, etc.
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE <TABLE_NAME> ADD FOREIGN KEY (COLUMN_NAME) REFERENCES TABLE_NAME(id)
Eg - Alter table vivagame11.matches add foreign key (leagueid) references vivagame11.league(id)
Comments
Post a Comment
Students you can ask your doubts in comment section