SQL

Creating Alias Names in SQL

Alias Name is nothing but duplicate or temporary or alternative name for a table or columns. In SQL, user can create two types of aliases in database.
        1. column level Alias Name
        2. Table level Alias Name

1. column level Alias Name:In this level, we are creating alias names for columns in the table.
Syntax:SQL>select <column Name> <column Alias Name> from <Table Name>;
Example:SQL>select sno student_name, sname student_name, saddress student_address, sfee student_fee from student;

2. Table level Alias Name:In this level, we are creating alias names for tables in the database.
Syntax:SQL>select <Table Alias Name . column Name> from <Table Name> <Table Alias Name>;
Example:SQL>select s.sno, s.sname s.saddress, s.sfee from student s;

About the author

karunakar

I completed the M.TECH, am enthusiastic to finding the gadgets & learning new things.

Add Comment

Click here to post a comment