I noticed this whilst browsing the SQL Server 2005 online help. It creates a permanent (until you DROP SYNONYM) alias to an object in SQL Server. This could be very useful in shortening the amount SQL you need to type. Imagine you have a remote database containing a schema and table. You can either:
SELECT * FROM REMOTE_SERVER.SCHMEA_NAME.THE_TABLE_IN_QUESTION
Or:
CREATE SYNONYM THE_TABLE FOR REMOTE_SERVER.SCHMEA_NAME.THE_TABLE_IN_QUESTIONGOSELECT * FROM THE_TABLE
Useful? Yes, but even more so when you need to use a database that has daft object naming conventions like Remedy managed systems.
CREATE SYNONYM Customers FOR dbo.C0183GOSELECT * FROM Customers
Page rendered at Thursday, September 09, 2010 3:30:37 PM (GMT Daylight Time, UTC+01:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.