Scripts

Technical Article

Primary Keys which are not Clustered Indexes in a database

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.

(5)

You rated this post out of 5. Change rating

2013-09-18 (first published: )

1,928 reads

Blogs

AI in SQL Server vs PostgreSQL: Vector Search, Embeddings, and RAG Compared

By

Both SQL Server and PostgreSQL are moving fast into AI territory — and if...

Monday Monitor Tips: AI Alert Analysis

By

We keep adding new AI capabilities to Redgate Monitor, where it makes sense. Check...

From SQL Saturday to Day of Data

By

A behind-the-scenes look at Day of Data Jacksonville 2026, the transition from SQL Saturday,...

Read the latest Blogs

Forums

Bank BCA KCU Bengkulu telp 0817 844 112

By w4l3t4

WhatsApp Cs,0817844112 Jl. S. Parman No.66, Kebun Kenanga, Kec. Ratu Agung, Kota Bengkulu, Bengkulu...

Bank BCA KCU Bukittinggi telp 0817 844 112

By w4l3t5

WhatsApp Cs,0817844112 Jl. Sudirman No.59, Bukit Cangang Kayu Ramang, Kec. Guguk Panjang, Kota Bukittinggi,...

Bank BCA KCU Padang telp 0817 844 112

By w4l3t3

WhatsApp CS,0817844112 Jl. H. Agus Salim No.10 A, Sawahan, Kec. Padang Tim., Kota Padang,...

Visit the forum

Question of the Day

Converting Money

Does this run successfully on a SQL Server 2022, US English default installation?

DECLARE @YenAmount MONEY;
SET @YenAmount = ¥1500; 

SELECT @YenAmount AS RawValue;

See possible answers