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,909 reads

Blogs

First Time Speaking with a Mask at an Event

By

Over the past couple of months, I have started losing my ability to talk...

A New Word: Apolytus

By

apolytus– n. the moment you realize you are changing as a person, finally outgrowing...

Tired of Tedious SQL Queries? AI Tools Can Automate The Boring Parts

By

If you've ever wrestled with complex SQL code, you know the drill. Hours spent...

Read the latest Blogs

Forums

Slow update on temp table

By dpaproskijr

I have a job running each night starting at 4:30AM and usually finishing at...

Table Partitioning - remove null range

By goher2000

hi guys,   I have a partitioned table AM_ITM_INSTNC_MSS and I want to  get...

Principal owns a service?

By Brandie Tarvin

This is one I haven't seen before. I'm trying to drop a database user...

Visit the forum

Question of the Day

Read Only Replica in SQL Server Standard

Our environment runs using SQL Server Standard. We are implementing Availability groups. Our database has been experiencing high read volumes, so I want to let the application read the Synchronized Secondary replica, as I read that HADR does this. Can we implement this?

See possible answers