Primary Key (PK)

External Article

Primary Key Primer for SQL Server

  • Article

Every database developer uses keys, but without always understanding all the ramifications. They come with few hard and fast rules, but if you get them right from the start with a database design, the whole process of database development is simpler, and the result is likely to perform better. We asked Phil for advice, little knowing that the explanation might take a while.

2013-12-19

5,005 reads

Technical Article

Primary Keys which are not Clustered Indexes in a database

  • Script

Recently I was asked to find all the Primary keys that are not clustered Indexes in the database. I constructed the below script which will help us to locate the primary keys in the database which are not clustered index.

4.2 (5)

You rated this post out of 5. Change rating

2013-09-18 (first published: )

1,921 reads

Blogs

Trace Flag 1448 – Lessons from a Technical Interview

By

In SQL Server environments where transactional replication runs alongside Always On Availability Groups (AGs),...

Disable the sa login in SQL Server (and sleep better)

By

Disable the sa login in SQL Server (and sleep better)If you run SQL Server...

Leadership in Times of Change: Guiding Teams Through Uncertainty, Disruption, and Transformation

By

Change is inevitable. What separates thriving organizations from those that falter is not the...

Read the latest Blogs

Forums

Create an HTML Report on the Status of SQL Server Agent Jobs

By Nisarg Upadhyay

Comments posted to this topic are about the item Create an HTML Report on...

repeat results without loops, MSSQL2005 Express

By Sailor

hello everybody, new here and this is my first question I have a table...

how to write this query?

By water490

Hi everyone I am a bit stuck on how to write this query. Below...

Visit the forum

Question of the Day

Azure SQL Database MAXDOP

When Azure SQL Database was originally released, the MAXDOP was set to 0 for each new database. In Oct 2025, what is the default value for Azure SQL databases?

See possible answers