# alias

fun <T : Table> T.alias(alias: String): Alias<T>

Creates a temporary identifier, alias, for this table.

The alias will be used on the database-side if the alias object is used to generate an SQL statement, instead of this table object.

#### Samples

org.jetbrains.exposed.v1.tests.shared.dml.JoinTests.testJoinWithAlias01

fun <T : AbstractQuery<*>> T.alias(alias: String): QueryAlias

Creates a temporary identifier, alias, for this query.

The alias will be used on the database-side if the alias object is used to generate an SQL statement, instead of this query object.

#### Samples

org.jetbrains.exposed.v1.tests.shared.AliasesTests.testJoinSubQuery01

fun <T> Expression<T>.alias(alias: String): ExpressionAlias<T>

Creates a temporary identifier, alias, for this expression.

The alias will be used on the database-side if the alias object is used to generate an SQL statement, instead of this expression object.

#### Samples

org.jetbrains.exposed.v1.tests.shared.AliasesTests.testJoinSubQuery01

fun <T> ExpressionWithColumnType<T>.alias(alias: String): ExpressionWithColumnTypeAlias<T>

Creates a temporary identifier, alias, for this expression with column type.

The alias will be used on the database-side if the alias object is used to generate an SQL statement, instead of this expression with column type object.

#### Samples

org.jetbrains.exposed.v1.tests.shared.AliasesTests.testExpressionWithColumnTypeAlias