Learn SQL Alises

In this chapter you will learn:
About aliases
Example of aliases

About aliases

SQL aliases are used to refer to the table with another name or to uniquely identify the table. It is defined in the FROM clause of the SELECT statement. It became mandatory to use a table alias when listing the column names in the SELECT statement due to duplicate column name in multiple tables.

Example of aliases

select e.employeeid, e.title, emp.rate,
emp.payfrequency from humanresources.employee e join
humanresources.employeepayhistory emp on e.employeeid=emp.employeeid


aliases example image

SUMMARY In this chapter, you have learned about SQL aliases with one example. In the next chapter you will get search data exercise.
 

Share your thought