How to create Sql Synonym or “Alias” for Database Name?

后端 未结 4 1502
隐瞒了意图╮
隐瞒了意图╮ 2020-12-16 10:00

I\'m using ms sql 2008 and trying to create a database name that references another database. For example \'Dev\', \'Test\', \'Demo\' would be database names that i could re

4条回答
  •  醉梦人生
    2020-12-16 10:59

    use 3 part notation and alias up to the table, example

    select * from tempdb.dbo.sysobjects a
    join master.dbo.sysobjects b on a.id = b.id
    

提交回复
热议问题