In SQL Server, you can use a function useto point a query to another database. For instance:
USE databasename
GO;
Is there a function that allows you to point to another database server and use the database on this server? I would expect this to work, but no luck:
USE [servername].databasename
GO;
I know that I can simply specify the database request on another server, but when I am engaged in production and intermediate environments, it is more efficient to declare the server and the database at the beginning of the request.
thank
source
share