Re: sql script
From: Martin Selway (martin.selway_at_casserviceltd.com)
Date: 11/05/04
- Next message: Lalit: "Remote Query Execution Error -21474672559"
- Previous message: Ing. Branislav Gerzo: "Return DataType"
- In reply to: ichor: "sql script"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 5 Nov 2004 10:18:23 -0000
You need to drop the PK constraint, drop the existing index, create the new
clustered index then create the PK constraint.
"ichor" <ichor@hotmail.com> wrote in message
news:uFQQrPuwEHA.1260@TK2MSFTNGP12.phx.gbl...
> hi i need to write a script that converts a non-clustered index to a
> clustered index. anyone know how. the table is very huge and has about 5
> million recs.
>
> create NONCLUSTERED INDEX [PK_Table1] ON [dbo].[Table1]([id]) WITH
> FILLFACTOR = 90 ON [PRIMARY]
>
> this is the index and its the primary key of a table.
> i need to write a script so that i can just execute it on the server. i
can
> do this using the GUI that SQL SErver 2000 provides. but have to write the
> script. any one know how?
>
> Thnx
>
>
- Next message: Lalit: "Remote Query Execution Error -21474672559"
- Previous message: Ing. Branislav Gerzo: "Return DataType"
- In reply to: ichor: "sql script"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|