SQL: Should foreign keys be indexed in SQL Server?

added by DotNetKicks
12/5/2018 2:32:33 PM

1 Kicks, 2412 Views

If I create a primary key (let's say a CustomerID in a Customers table) in SQL Server, an index is automatically created to support that key. Primary keys must be unique and not null. SQL Server uses that index to ensure that the key is unique.


0 comments