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

相关文章:

  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2022-02-07
  • 2022-02-17
相关资源
相似解决方案