Skip to main content
The Alias engine creates a proxy to another table. All read and write operations are forwarded to the target table, while the alias itself stores no data and only maintains a reference to the target table.

Creating a Table

Or with explicit database name:
The Alias table does not support explicit column definitions. Columns are automatically inherited from the target table. This ensures that the alias always matches the target table’s schema.

Engine Parameters

  • target_db (optional) — Name of the database containing the target table.
  • target_table — Name of the target table.
When target_db is omitted and target_table is not fully qualified (e.g., Alias('my_table')), the target is resolved to the same database as the alias itself, not the session’s current database.

Supported Operations

The Alias table engine supports all major operations.

Operations on Target Table

These operations are proxied to the target table:

Operations on Alias Itself

These operations only affect the alias, not the target table:

Usage Examples

Basic Alias Creation

Create a simple alias in the same database:

Cross-Database Alias

Create an alias pointing to a table in a different database:

Write Operations Through Alias

All write operations are forwarded to the target table:

Schema Modification

Alter operations modify the target table schema:

Data Mutations

UPDATE and DELETE operations are supported:

Partition Operations

For partitioned tables, partition operations are forwarded:

Table Optimization

Optimize operations merge parts in the target table:

Alias Management

Aliases can be renamed or dropped independently:
Last modified on July 2, 2026