About Me

My photo
Northglenn, Colorado, United States
I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).

Tuesday, July 02, 2013

Quick Reminder: How to find a field in a database, within SQL Server

select
t.name as table_name,
SCHEMA_NAME(schema_id) as schema_name,
c.name as column_name
from sys.tables as t
inner join sys.columns c on t.object_id = c.object_id
where c.name like '%Some Field Name%'
order by schema_name, table_name;

No comments: