create proc sp_EnumDatabases
as
begin
create table ##tt1(dbname varchar(500))
exec sp_msforeachdb "insert into ##tt1 select '?' dbname "
select * from ##tt1
DROP TABLE ##tt1
end
create proc sp_EnumDatabases
as
begin
create table ##tt1(dbname varchar(500))
exec sp_msforeachdb "insert into ##tt1 select '?' dbname "
select * from ##tt1
DROP TABLE ##tt1
end