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 |
tshaw20832
Starting Member
10 Posts |
Posted - 2014-07-10 : 09:46:15
|
All,I am trying to figure out how to find out if a Column name exists and where in a database. There are 123 tables.Thank you,T |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-07-10 : 09:51:26
|
[code]SELECT object_name(object_id) as table_nameFROM sys.columnsWHERE name = 'a_column_name'[/code]similarly, you can also query INFORMATION_SCHEMA.COLUMNS to get the information you want KH[spoiler]Time is always against us[/spoiler] |
|
|
tshaw20832
Starting Member
10 Posts |
Posted - 2014-07-10 : 10:14:12
|
Thank you very much. That is exactly what I needed. You are a life saver. |
|
|
|
|
|