SQL Server 2005 introduces the concept of a synonym: a
single-part name that can replace a two-, three-, or four-part name in
many SQL statements. Using synonyms lets you cut down on typing (always a
welcome advance for developers!) and can also provide an abstraction layer
to protect you against changes in underlying objects. To understand how
this works, let's start with the syntax for creating synonyms. Not
surprisingly, this is the CREATE SYNONYM statement:
For example, in the AdventureWorks sample database you can create a
synonym this way:
CREATE SYNONYM ProdCat
FOR AdventureWorks.Production.ProductCategory
Having done this, you can now proceed to use the synonym in SQL
statements. For example: