Ads

Showing posts with label Search Table Name in Databases. Show all posts
Showing posts with label Search Table Name in Databases. Show all posts

29 July 2010

To Search Table Name In List Of Databases

EXEC sp_MSForEachDB 'IF ''[?]'' NOT IN (''[master]'', ''[model]'', ''[msdb]'', ''[tempdb]'')
IF EXISTS(Select * from [?].sys.tables where name like
''SEARCHCRITERIA OR TABLENAME'') print ''[?]'''