Alter Table Command in relation to another table primary key [message #608296] |
Tue, 18 February 2014 08:12 |
|
Lahkra
Messages: 10 Registered: February 2014
|
Junior Member |
|
|
I have a question about the Alter Table command in Oracle. When adding a column to a table, how does this relate to the key in another table? For example, if table TEAM is made and table DEPARTMENT is made, the Alter Table command is used to add the DEPT_ID attribute (primary key of DEPARTMENT)to table TEAM, is there a line that needs to be created in the ADD command showing a reference? Like if in TEAM there is already a reference to another attribute from another table as a Foreign Key, would this type of reference be needed in the Alter Table command?
I've looked at many sites and searched here, but maybe my search was too broad. My book just shows the Alter Table command can add a column to a table, but it doesn't talk about the relationship between tables once that is done concerning keys. Otherwise, how does the system know where to update the needed information from?
Thank you
|
|
|
|
|
|
|
|
|
|
|
|
|
|