Sometimes you need to find out in which tables a certain column name exists. For example when you want to find out where it’s being used as a foreign key. Here’s a handy script to use in T-SQL.
SELECT OBJECT_NAME(object_id), * FROM sys.columns WHERE name = 'columnname'
Grz, Kris.
Powered by: newtelligence dasBlog 2.3.9074.18820
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2012, Kris van der Mast
E-mail