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 |
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 2008-01-22 : 15:55:11
|
need to find all tables that contain both AccountNumber and DealerNumberhow can I do this? |
|
jdaman
Constraint Violating Yak Guru
354 Posts |
Posted - 2008-01-22 : 16:00:00
|
[code]SELECT a.TABLE_NAMEFROM INFORMATION_SCHEMA.COLUMNS aJOIN INFORMATION_SCHEMA.COLUMNS b ON a.TABLE_NAME = b.TABLE_NAMEWHERE a.COLUMN_NAME = 'AccountNumber' AND b.COLUMN_NAME = 'DealerNumber'[/code] |
 |
|
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 2008-01-22 : 16:02:11
|
perfect!! |
 |
|
|
|
|