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 |
|
zeeshan13
Constraint Violating Yak Guru
347 Posts |
Posted - 2007-04-10 : 15:13:43
|
| Hi All,Is there a way to find a table name, if I know the field name. Thats the only information I have.Lets say I want to know that in the entire database which table holds the column/field 'EmployeeID' (thats the only information I have).That is, list the name of table/s which holds the 'EmployeeID' field.Is there a way to find out this, in SQL? |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-10 : 15:19:29
|
| select * from information_schema.columnsPeter LarssonHelsingborg, Sweden |
 |
|
|
Zim327
Yak Posting Veteran
62 Posts |
Posted - 2007-04-10 : 15:20:56
|
| Look in this thread[url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81255[/url]Best regards, Zim(Future Eternal Yak God Emperor) |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-10 : 15:25:10
|
| He only wanted the table name by searching for column name.But you are right, that script also searches the tables...Peter LarssonHelsingborg, Sweden |
 |
|
|
zeeshan13
Constraint Violating Yak Guru
347 Posts |
Posted - 2007-04-10 : 16:04:56
|
| Peso,Thanks a lot :) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-04-11 : 08:44:37
|
quote: Originally posted by Zim327 Look in this thread[url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81255[/url]Best regards, Zim(Future Eternal Yak God Emperor)
No thats not correct answerMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|