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 |
|
kid_on_the_block
Posting Yak Master
172 Posts |
Posted - 2005-12-01 : 13:48:31
|
| I have a database with 10 tables I have a field named CustID .... I want to find out how many tables have this field CustIDNow one way was check up the design of every table & see whether its there or not (the field) is there any query through which we can get this info Please help |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-12-01 : 13:54:02
|
| [code]SELECT TABLE_SCHEMA + '.' + TABLE_NAMEFROM INFORMATION_SCHEMA.COLUMNSWHERE COLUMN_NAME = 'MyColumnName'[/code]Kristen |
 |
|
|
kid_on_the_block
Posting Yak Master
172 Posts |
Posted - 2005-12-01 : 14:35:02
|
| Thanks , & what if the same is need in Sybase ... |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-12-01 : 23:47:24
|
| Sorry, don't know. This is a Microsoft SQL Server forum, but others may be along who will know.You could probably use the "syscolumns" table, in Sybase, instead.Kristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-02 : 00:14:37
|
| Post sybase questions at Sybase Forums such as www.DBForums.comMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|