Content deleted Content added
No edit summary |
style; no need for abbreviation as abbreviation isn't used a second time; wikified |
||
Line 1:
An alias is a feature of SQL that is supported by most, if not all, [[RDBMS|relational database management systems (RDBMSs)]].
<br />
Aliases provide [[
# Reduces the amount of code required for a query, and
Line 11:
# Column aliases
You can give another name to a table (for the duration of the [[Select (SQL)|SELECT query]]) by using an alias.
''This does not rename the database table!''
Line 44:
A column alias is similar:
SELECT d.DepartmentId AS Id, d.DepartmentName AS Name FROM Department d
In the returned [[result
<br><br>
Also, if only one table is being selected and the query is not using [[Join (SQL)|table joins]], it is permissible to omit the table name or table alias from the column name in the SELECT statement. Example as follows:
|