Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
new2this
Starting Member
16 Posts |
Posted - 2008-05-06 : 16:34:58
|
| Is there a way to create a stored procedure that accepts a column name and returns the name of the tables that have that column name? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-06 : 16:51:27
|
| SELECT TABLE_NAMEFROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = 'SomeColumn'Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
new2this
Starting Member
16 Posts |
Posted - 2008-05-06 : 16:53:40
|
| Thanks - In the where statment, I forgot the _Name after Column. |
 |
|
|
|
|
|