Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dropping constraints
Message
De
17/02/2001 11:23:16
 
 
À
15/02/2001 12:36:25
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00476242
Message ID:
00476990
Vues:
27
>This query will list all the FK constraints for a given table. Wrap it up in a cursor and you'll it.
>
>
>SELECT T.Table_Name, RC.Constraint_Name
>FROM
>	INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE T INNER JOIN
>	INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC ON
>	T.Constraint_Name = RC.Constraint_Name
>WHERE T.Table_Name = 'titleauthor'
>
>
>It should work for SQL Server 7.0 and up.
>
>-Mike

Thanks Mike! I'm surprised there is not already some stored procedure to remove contraints.
Ken B. Matson
GCom2 Solutions
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform