Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find tables with specific field name?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01323056
Message ID:
01323112
Vues:
16
This message has been marked as the solution to the initial question of the thread.
>>Is there a way in SQL Server Management Studio to find tables with a specific field name?
>
>SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
>WHERE TABLE_NAME IN (
>        SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS
>        WHERE COLUMN_NAME='My Field'
>)
No need of WHERE IN, INFORMATION_SCHEMA.COLUMNS has also TABLE_NAME :-)
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='My Field'
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