Encrypt and Decrypt in SQL Server

T-SQL Columns, Tables Alias

In SQL, we can alias columns, views and tables. A table alias is also called a co-relation name.
It is a temporarily names of columns or tables.

The Alias temporarily assigns another name to a column, or table at the time of a SELECT query and the assigning alias doesn’t rename the column or table name actually!

Basically, it make column, or table more readable to the programmers.

Syntax:
--USE OF TABLE ALIAS
SELECT TBL.Id, TBL.Name 
    FROM [dbo].[Tbl_Demo] AS TBL
WHERE TBL.Id in (1, 2, 3) 

--USE OF COLUMN ALIAS
SELECT TBL.Id AS UID, TBL.Name AS UNAME
    FROM [dbo].[Tbl_Demo] AS TBL
WHERE TBL.Id in (1, 2, 3) 
ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book