PostgreSQL SyntaxLesson 29Free preview
PostgreSQL AS
This lesson is part of PostgreSQL · All levels
Summary
US keywords give aliases to the result column and to the tables used in the query. The alias makes the results of the calculations easier to read and shorten the spelling of the long table names in the join query. Its use is optional for tables, but highly recommended for code readability.
Key points
- The U.S. names the result column or table by alias.
- The expression of a count should be given an alias so that the column title is clear.
- The table alias simplifies the join query and the subquery.
- U.S. keywords are optional but recommended for readability.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.