SQLTeam.com | Weblogs | Forums

Primary Key and Foreign Key



can we create primary key and foreign key in same column ? off course we can create, but is it make any performance related issues ? Can you please any help ?

Advance Thanks,
Vignesh R


Do you mean a primary key column that is a foreign key into another table? If your business logic calls for it, there is nothing wrong with doing that. In and of itself, that should not cause any performance problems.

When you want to represent a base class and derived classes (from object oriented programming languages) in a database on often resorts to this type of tables.


Hi JameshK,

Thank you very much for your kind replay.