5 Years
Discussion Span
Last Post by Reverend Jim

alias name has several advantages.

  1. The readability of a QUERY(MOSTLY USED WITH SELECT STATEMENT) can be improved by giving a table an alias, also known as a correlation name or range variable. A table alias can be assigned either with or without the AS keyword:

* table_name AS table alias
* table_name table_alias.
2. This can also be useful on using self join.

Edited by IIM


I have a class that builds my html tables dynamically along with the table headers to show query results, I use an alias for some of the columns to change them to something different that I want to show in my html table. I assume we're talking about all types of aliases, so I thought I would through this in there too.


There is a certain query that you can use to check a table for duplicate records. This requires doing a JOIN on a table with itself. As far as I know, the only way to do this is by creating two aliases for the same table.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.