Table of Contents
Alias Definition
Return to Alias declaration
Definitions vs Declarations, Definitions and Declarations (computer programming): Type definition - User-defined type definition, Variable definition - Constant definition, Class definition - Object definition, Constructor definition - Destructor definition, Struct definition - Record definition, Function definition - Method definition, Lambda definition - Anonymous function definition, Enumerator definition, Pointer definition, Generic definition - Template definition, Interface definition - Protocol definition - Trait definition, Namespace definition - Package definition - Module definition - Alias definition - Import definition - Export definition, Macro definition. Programming terms. (navbar_definition)
- Snippet from Wikipedia: Aliasing (computing)
In computing, aliasing describes a situation in which a data location in memory can be accessed through different symbolic names in the program. Thus, modifying the data through one name implicitly modifies the values associated with all aliased names, which may not be expected by the programmer. As a result, aliasing makes it particularly difficult to understand, analyze and optimize programs. Aliasing analysers intend to make and compute useful information for understanding aliasing in programs.
- Snippet from Wikipedia: Alias (command)
In computing, alias is a command in various command-line interpreters (shells), which enables a replacement of a word by another string. It is mainly used for abbreviating a system command, or for adding default arguments to a regularly used command.
alias
is available in Unix shells, AmigaDOS, 4DOS/4NT, FreeDOS, KolibriOS, Windows PowerShell, ReactOS, and the EFI shell. Aliasing functionality in the MS-DOS and Microsoft Windows operating systems is provided by the DOSKey command-line utility.An alias will last for the life of the shell session. Regularly used aliases can be set from the shell's rc file (such as
.bashrc
) so that they will be available upon the start of the corresponding shell session. The alias commands may either be written in the config file directly or sourced from a separate file.
- Snippet from Wikipedia: Alias (SQL)
An alias is a feature of SQL that is supported by most, if not all, relational database management systems (RDBMSs). Aliases provide users with the ability to reduce the amount of code required for a query, and to make queries simpler to understand. In addition, aliasing is required when doing self joins (i.e. joining a table with itself.)
In SQL, you can alias tables and columns. A table alias is called a correlation name, according to the SQL standard. A programmer can use an alias to temporarily assign another name to a table or column for the duration of the current SELECT query. Assigning an alias does not actually rename the column or table. This is often useful when either tables or their columns have very long or complex names. An alias name could be anything, but usually it is kept short. For example, it might be common to use a table alias such as "pi" for a table named "price_information".
The general syntax of an alias is
SELECT * FROM table_name [AS] alias_name
. 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:Using a table alias:
We can also write the same query like this (Note that the AS clause is omitted this time):
A column alias is similar:
In the returned result sets, the data shown above would be returned, with the only exception being "DepartmentID" would show up as "Id", and "DepartmentName" would show up as "Name".
Also, if only one table is being selected and the query is not using table joins, it is permissible to omit the table name or table alias from the column name in the SELECT statement. Example as follows:
Some systems, such as Postgres and Presto, support specifying column aliases together with table aliases. E.g.
would produce the same result set as before. In this syntax it is permissible to omit aliases for some column names. In the example, an alias was provided for DepartmentId, but omitted for DepartmentName. Columns with unspecified aliases will be left unaliased. This syntax is often used with expressions that do not produce useful table and column names, such as VALUES and UNNEST. As an example, one may conveniently test the above SQL statements without creating an actual Departments table by using expressions such as
Language Specifics
1. Bash Scripting
2. C Language
3. C++
4. C#
5. Clojure
6. COBOL
- COBOL alias definition on IBM.com/docs
7. Dart
8. Elixir
9. Fortran
- Fortran alias definition on IBM.com/docs
10. Go
11. Groovy
12. Haskell
13. IBM REXX
- REXX alias definition on IBM.com/docs
14. IBM JCL
- JCL alias definition on IBM.com/docs
15. Java
16. JavaScript
17. Kotlin
18. PHP
19. PowerShell
20. Python
21. Ruby
22. Rust
23. Scala
24. Swift
25. Microsoft T-SQL
26. TypeScript
Search
- Snippet from Wikipedia: Declaration (computer programming)
In computer programming, a declaration is a language construct specifying identifier properties: it declares a word's (identifier's) meaning. Declarations are most commonly used for functions, variables, constants, and classes, but can also be used for other entities such as enumerations and type definitions. Beyond the name (the identifier itself) and the kind of entity (function, variable, etc.), declarations typically specify the data type (for variables and constants), or the type signature (for functions); types may also include dimensions, such as for arrays. A declaration is used to announce the existence of the entity to the compiler; this is important in those strongly typed languages that require functions, variables, and constants, and their types to be specified with a declaration before use, and is used in forward declaration. The term "declaration" is frequently contrasted with the term "definition", but meaning and usage varies significantly between languages; see below.
Declarations are particularly prominent in languages in the ALGOL tradition, including the BCPL family, most prominently C and C++, and also Pascal. Java uses the term "declaration", though Java does not require separate declarations and definitions.
Also Listed As
© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers
SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.