Overview

USE tempdb;
GO

-- Create a synonym for the Product table in AdventureWorks on tempdb database.
CREATE SYNONYM [MyProduct]
FOR [AdventureWorks].[Production].[Product];

-- Query the Product table by using the synonym.
USE tempdb;

SELECT [ProductId], [Name]
FROM [MyProduct]
WHERE [ProductId] < 5;

Remarks