skip to main | skip to sidebar

ASP.NET

Wednesday, December 3, 2008

Proper way to change an Index from UNIQUE CONSTRAINT to PRIMARY KEY

Went form Bad SQL
DROP INDEX [PK_TableName] ON [dbo].[TableName] WITH ( ONLINE = OFF )

To Good SQL
ALTER TABLE [dbo].[TableName] DROP CONSTRAINT [PK_TableName]
Bookmark and Share
Posted by Mansoor at 8:53 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2011 (1)
    • ►  December (1)
  • ►  2010 (10)
    • ►  August (1)
    • ►  April (7)
    • ►  February (2)
  • ►  2009 (57)
    • ►  November (1)
    • ►  September (1)
    • ►  August (2)
    • ►  July (20)
    • ►  June (11)
    • ►  May (19)
    • ►  April (2)
    • ►  February (1)
  • ▼  2008 (8)
    • ▼  December (8)
      • Java Script for Making HTML Control Toogle
      • An Introduction to Clustered and Non-Clustered Ind...
      • Proper way to change an Index from UNIQUE CONSTRAI...
      • Implementing Triggers in SQL Server 2000
      • Creating a new database with Sql Server Managment ...
      • System Tables and Catalog Views
      • SQL Server consists of six databases by default.Ma...
      • SQl Server System Tables And Views

My Fav

  • SQL INterview Questions - LogicsMeet
  • MS CRM
  • MVP Small EXAMPLE
  • Scripts
  • Dynamic drive
  • WCSF Sample Application
  • Pinal Dave -Sql BlogAuthority
  • SQL
  • Regular Expressions
  • INTERSETING BLOG
  • Q && A
  • Convert C# to VB
  • SYNC Fusion
  • DB Interview
  • HighonCoding
  • Praveen