'Data-Object Aliases in SQL Server
I'm looking to alias an object -- mainly tables -- in SQL Server. There is the concept of "Alias" in SQL Server, but this refers to at the Server/Instance level and I am looking to persistently alias db objects.
As an example:
SELECT *
FROM [MyDB].[MySchema].[MySalesTables]
Instead being able to use:
SELECT *
FROM sales
I know I can temporarily alias a table/field by doing:
SELECT *
FROM [MyDB].[MySchema].[MySalesTables] AS sales
But I'm wondering if there is a management layer in SQL Server (or even SSMS) where I can just add aliases to my most common table names so that I can refer to them more easily.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
