Aliases


Aliases are used to temporarily rename a table name or a column name.
In SQL Aliases, separate alias are given for some time for the table or its column.

Syntax :- Alias for column

SELECT   column_name AS alias_name
FROM table_name;
Example : Let's see how to create Aliases statement for column.

Query :
SELECT  name AS student_Name
FROM student;
Output :


Now, you can see i used  ALIAS statement in student table column and the change the column name. 

Alias for Table 


Syntax :- Alias for table
SELECT   column_name FROM student
FROM
table_name AS Alias_name;
Example : Let'see how to create Alias for table.

Query :
SELECT name FROM student
AS vidyarthi;
Output :