v.25.9New Feature

Allow users

Allows users to create temporary views with a similar syntax to temporary tables (CREATE TEMPORARY VIEW). #86432 (Aly Kafoury).
Introduces support for creating temporary views in ClickHouse using the CREATE TEMPORARY VIEW syntax, similar to temporary tables.

Why it matters

This feature allows users to define temporary views that exist only for the duration of the session or query context, providing a convenient way to reuse complex query logic without creating persistent database objects. It simplifies query management and improves workflow efficiency by enabling ad-hoc temporary view definitions.

How to use it

Users can create a temporary view by executing a statement like:

CREATE TEMPORARY VIEW view_name AS
SELECT ... FROM ...;


The temporary view will be available only within the current session and will be automatically dropped afterwards.