Content deleted Content added
Jason Quinn (talk | contribs) WP:ORDER fix |
|||
Line 2:
An '''alias''' is a feature of SQL that is supported by most, if not all, [[RDBMS|relational database management systems (RDBMSs)]]. Aliases provide [[database administrator]]s, as well as other database users, with the ability to reduce the amount of code required for a query, and to make queries simpler to understand. In addition, aliasing can be used as an [[Obfuscation (software)|obfuscation technique]] to protect the real names of database fields.
In SQL, you can alias tables and [[Column (database)|columns]]. A table alias is also called a '''correlation name'''.<ref>ANSI Standard SQL
The general syntax of an alias is <code>SELECT * FROM table_name [AS] alias_name</code>. Note that the AS keyword is completely optional and is usually kept for readability purposes. Here is some sample data that the queries below will be referencing:
|