Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modify Primary Key
Message
 
 
À
14/09/2005 23:40:44
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01049725
Message ID:
01049777
Vues:
14
You have to drop existing PK and create a new one.

>I have table as below with PK crefdoc+nsn, how could I change the PK to crefdoc+cbzunit using T-SQL?
>
>
CREATE TABLE [dbo].[fbzplnd] (
>	[crefdoc] [char] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
>	[nsn] [decimal](3, 0) NOT NULL ,
>	[cbzunit] [char] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
>	[nvalue] [decimal](10, 2) NOT NULL
>) ON [PRIMARY]
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform