Click here to Skip to main content
15,891,745 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how many primary ,foregin key use in a table?
Posted

Your question is not too clear, however I will try and give you some answers...
Any given table can be one, and only one, primary key, and that key will always be unique...
A foreign key is a key that point from THIS table to a primary key of an OTHER table. In theory you can have as many foreign keys as you want, but it is recommended that you do not exceed 253...
See this table about capabilities of SQL:https://msdn.microsoft.com/en-us/library/ms143432(v=sql.105).aspx[^]
 
Share this answer
 
sql server capacity specifications [^]

This shows that you can have unlimited forgein keys but are recommended not to exceed over 253.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900