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;
Query :
SELECT name AS student_NameOutput :
FROM student;
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;
Query :
SELECT name FROM studentOutput :
AS vidyarthi;
0 Comments