What is an alias?
-
What is an alias?
-
What is an alias?
-
What is an alias?
It lets you replace
[MyDB].[dbo].[MyTable]
with a shorter name, such asa
:SELECT a.*
FROM [MyDB].[dbo].[MyTable] AS aYou can also use the aliasiing feature on column names, like so:
SELECT [MyReallyLongColumnName] AS ShorterName
FROM [MyDB].[dbo].[MyTable]A simple google search will give you all the nuances regarding the use of aliasing in SQL Server (for columns, sometimes you should, sometimes you must, and sometimes you don't have to use aliasing. BTW, you generally alias table names when using
join
ormerge
.".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013