Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find tables with specific field name?
Message
General information
Forum:
Microsoft SQL Server
Category:
Database management
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01323056
Message ID:
01323112
Views:
14
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform