Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Foreign Key refrence

Author  Topic 

harish_babu
Starting Member

19 Posts

Posted - 2001-08-31 : 05:20:47
Hi,
Can we refrence a non primary key column as foreign key in another table.Is that good practice to do ?For eg i have 2 tables -table 1 and table 2. table1 has empid(PK), empname, empcode and table2 has dept_id,dept_name,empcode (empcode refrence to empcode of table1).i want to know whether its good practice to do this or i must and should have refrence to primary key (in this case empId) to relate 2 tables

Thanks in advance
Harish

   

- Advertisement -