Monday, August 24, 2009

Find a Table withing SQL server instance with LIKE

EXEC master..sp_MSForEachDB '

if(''?'' not in (''master'',''msdb'',''tempdb'',''model''))
begin
use ?
select * from information_schema.tables where table_name like ''%billing_%''
end

'
go

No comments: