sql - Automatic connection of a new table in a existing Mysql database -


i have schema on db there tables. have create table schema , have connect others present on schema.i make example:

tables present:

school(idschool,numstud,idcountry); shop(idshop,idcountry); 

new table:

country(idcountry,....); 

i want know if there automatic mode connect them (it means not set foreign key manually).

i want know if there automatic mode connect them (it means not set foreign key manually).

no.

how dbms know country.idcountry , school.idcountry given same name intention connected, instead of accidentally?

you'll have use alter table ... add foreign key (...) references ...1 explicitly create foreign key in existing table.


1 or alter table ... add constraint ... foreign key (...) references ....


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -