Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

clusterd index Expand / Collapse
Author
Message
Posted Friday, January 16, 2009 4:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, January 16, 2009 5:25 AM
Points: 3, Visits: 5
how to drop the clustered index????
Post #637878
Posted Friday, January 16, 2009 4:59 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 8:22 AM
Points: 2,663, Visits: 5,807
drop index tablename.indexname

But I suspect there maybe more to your question! Is this index used to support a primary key or unique constraint?

Mike John



Post #637883
Posted Friday, January 16, 2009 5:00 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, August 11, 2014 9:44 AM
Points: 770, Visits: 1,597
Alter table
Alter table Table Name Drop Constraint ConstraintName


Check MSDN :) for more information
Post #637884
Posted Friday, January 16, 2009 5:23 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:51 PM
Points: 42,756, Visits: 35,850
CrazyMan (1/16/2009)
Alter table
Alter table Table Name Drop Constraint ConstraintName


True, if the clustered index is part of a primary key or unique constraint. If it's just a plain index, DROP INDEX is the command to use.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #637894
Posted Friday, January 16, 2009 5:28 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, January 16, 2009 5:25 AM
Points: 3, Visits: 5
it's a primary key clustered.. so wt would be the ans???
Post #637896
Posted Friday, January 16, 2009 5:31 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, October 16, 2013 7:46 AM
Points: 533, Visits: 990
Alter table query stated by crazyman is your solution

-Vikas Bindra
Post #637901
Posted Friday, January 16, 2009 5:32 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, August 11, 2014 7:59 AM
Points: 879, Visits: 284
You can use ALTER TABLE statment...

But why do you want to drop clustered index on PK? Is yous PK generaation not in order? Or want to created clustered index on other key columns?


Regards,
Nitin

Post #637905
Posted Friday, January 16, 2009 5:38 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, July 31, 2014 5:13 AM
Points: 1,262, Visits: 3,420
satyawan_sanap (1/16/2009)
it's a primary key clustered.. so wt would be the ans???


ALTER TABLE YOUR_TABLE
DROP CONSTRAINT your_constraint_name


============================================================
SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #637910
Posted Friday, January 16, 2009 5:41 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, July 31, 2014 5:13 AM
Points: 1,262, Visits: 3,420
And be sure that you do not have any Foregin Key from other tables which is referenced to the PK ( Your Clustered Index)

============================================================
SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #637914
Posted Monday, October 7, 2013 11:21 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, January 6, 2014 1:02 AM
Points: 15, Visits: 56
drop index indexname on tablename
Post #1502463
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse