Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Maintaining tables from VFP
Message
De
12/01/2000 13:57:42
 
 
À
12/01/2000 13:41:17
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00316997
Message ID:
00317155
Vues:
20
>A true constraint is owned by a single table but can affect multiple columns. For instance, I can have a PRIMARY KEY constriant for column1 and column2:
>
>CONSTRAINT name PRIMARY KEY (column1, column2)
>
>But a default constraint is applicable to only one column.
>
>I haven't been able to determine an easy way to identify DEFAULT constraints. It appears that none of the INFORMATION_SCHEMA views reveals that information, and SQL-DMO doesn't either. I think you'll either have to hit the system tables directly or use sp_helpconstraints.
>
>-Mike

We have several bit fields which use the same (user defined) default constraint.

We found that sp_unbinddefault will remove the default constraint from a column without dropping the constraint.

For the time being, at least, I will have to access all tables in the database upfront, collecting sp_helpconstraints data into a VFP cursor. Then, check my cursor to determine if this is the only column to use the constraint. If it is, the constraint will be dropped. Otherwise, I will just unbind it.

Thanks, Brett
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform