Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verification if a primary key exists
Message
 
 
À
04/03/2008 15:11:11
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01298604
Message ID:
01298614
Vues:
25
>>Try
>>
>>USE
>>SELECT Table_Name as [Table], Column_Name as [Column],
>>Constraint_Name as [Constraint], Table_Schema as [Schema]
>>FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
>>ORDER BY [Table], [Column]
>
>Thanks

Didn't have time to test it thoroughly :( Anyway, it gives all the constrains, so you may just drop them using this query.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform