Thursday, August 27, 2009

Find All Occurences of a Specific Field Name in SQL Server

Here's a useful T-SQL script that will identify every table that has a field with a specific name:
select sysobjects.name
from syscolumns
left join sysobjects on sysobjects.id = syscolumns.id
where syscolumns.name like 'myFieldName'
order by 1
Source - Steve Gray

No comments:

Post a Comment