Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to populate default values for a new record?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01474230
Message ID:
01474287
Vues:
54
This message has been marked as a message which has helped to the initial question of the thread.
>>One time job?
>>If so:
>>
>>EXEC sp_MSForEachTable 'EXEC sp_columns ''?'''
>>
>>
>>:-))))))))))
>
>No, this would not do. I need to write a query to see if I have Defaults in any of the tables.
SELECT OBJECT_NAME(syscolumns.Id) AS Table_Name,
       syscolumns.name AS Column_Name,
       OBJECT_NAME(syscomments.id) AS Default_Constraint_Name
FROM syscomments 
INNER JOIN syscolumns ON syscomments.id = syscolumns.cdefault AND syscolumns.cdefault > 0
ORDER BY OBJECT_NAME(syscolumns.Id),syscolumns.name 
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform