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 |
|
paritosh
Starting Member
42 Posts |
Posted - 2011-09-15 : 08:21:45
|
| how to find table where exist in all database finding table in whole database.please give suitable logic and query . |
|
|
flamblaster
Constraint Violating Yak Guru
384 Posts |
Posted - 2011-09-15 : 09:33:39
|
| Could you maybe provide a bit more information? You could run:SELECT *FROM INFORMATION_SCHEMA.TABLESWHERE TABLE_NAME='TableYouAreSearchingFor'Without more information, it is difficult to know what you're trying to do. |
 |
|
|
paritosh
Starting Member
42 Posts |
Posted - 2011-09-16 : 06:48:20
|
| i want to know how . suppose we have 10 databases .if i want which database contain table 'abc' .without execute query 10 times . only single effort give the result what is logic we apply please give answer.. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-09-16 : 07:12:35
|
| This is undocumentedexec sp_msforeachdb 'if exists(select * from ?.sys.objects where name=''table_name'') select ''?'''MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|