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
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
TheAlias table engine supports all major operations.