Posted by AnithaKamatchi on Friday, March 03, 2017 in SQL | No comments
Usage :
Assign temporary alias name to columns and table
How the Alias works????
Consider the table "Student_List" as shown below
Case 1:
Retrieve all the columns in the table "Student_List" replacing student with participant for all the columns
Syntax:
Select <column name> as <alias name> from table <table_name>
Sample Query:
select student_id as "Participant_id",
student_name as "Participant_name",
student_age as "Participant_age",
student_grade as "Participant_grade",
skills as "participant_skill" from student_list
student_name as "Participant_name",
student_age as "Participant_age",
student_grade as "Participant_grade",
skills as "participant_skill" from student_list

0 comments:
Post a Comment