When creating a table in SQL using the 'Create Table' command, is it necessary to specifically define a 'Foreign Key' with 'References' to the appropriate primary key table primary key column, or does the fact that the primary key column name is in the new table (to be created) and thus it automatically assume its a Foreign Key? Something like:
Create Table yyyyy (
auto_id int not null,
emp_id int Foreign Key References tablexxx (emp_id)
xxxx
xxxx
)
If necessary to specifically define a Foreign Key, does this speed up data retrieval when joining the tables, or if you join them without specifying the Foreign Key, does that make data retrieval not as efficient?
Thanks for your help.
Create Table yyyyy (
auto_id int not null,
emp_id int Foreign Key References tablexxx (emp_id)
xxxx
xxxx
)
If necessary to specifically define a Foreign Key, does this speed up data retrieval when joining the tables, or if you join them without specifying the Foreign Key, does that make data retrieval not as efficient?
Thanks for your help.