Jun 2026 Discount: Comprehensive Database Performance Health Check | Testimonials

Home
  • Consulting
  • Training
  • Free Videos
  • All Articles
    • Interview Questions and Answers
    • SQL Tips and Tricks
    • SQL Performance
    • SQL Puzzle
    • Big Data
    • Blog Stats
    • SQL Books
  • Hire Me
  • Health Check

SQL SERVER – T-SQL Script to Add Clustered Primary Key

October 11, 2007
Pinal Dave
SQL, SQL Server, SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts
Jr. DBA asked me three times in a day, how to create Clustered Primary Key. I gave him following sample example. That was the last time he asked “How to create Clustered Primary Key to table?” USE [AdventureWorks] GO ALTER TABLE [Sales].[Individual] ADD CONSTRAINT [PK_Individual_CustomerID] PRIMARY KEY CLUSTERED ( [CustomerID]…
Read More
  • SQL Interview Q & A
  • Testimonials
  • Search
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com

Go to mobile version