Beginner

194. Table Alias

Learn how table aliases simplify SQL queries and make joins easier to read.

📘 Lesson 194 of 728 ⏱ 8 min 🎯 Beginner

A table alias is a temporary short name assigned to a table within a SQL statement. It allows columns to be referenced using a shorter identifier.

Table aliases make complex queries, especially joins involving multiple tables, shorter and easier to understand.

Use e as a short alias for the Employees table.

SQL
SELECT
    e.EmployeeName,
    e.Department
FROM Employees AS e;

Table aliases are heavily used in joins, subqueries, self-joins, and complex analytical queries.

  • Table aliases provide short temporary names.
  • They improve query readability.
  • They are useful in joins.
  • They help distinguish columns from multiple tables.
  • Aliases exist only within the query.
What is a table alias?

A table alias is a temporary name assigned to a table within a SQL statement.

Why are table aliases useful in joins?

They make queries shorter and help clearly identify which table each column belongs to.

Have you finished this lesson?

Introduction to SQL – All Lessons