> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> System table listing hypothetical (what-if) projections defined in the current session

# system.hypothetical_projections

Lists every hypothetical (what-if) projection defined in the current session. See [`CREATE HYPOTHETICAL PROJECTION`](/docs/reference/statements/hypothetical-projection#create-hypothetical-projection) and [`EXPLAIN WHATIF`](/docs/reference/statements/explain#explain-whatif).

The contents are session-scoped: each connection sees only its own hypothetical projections, and the table is empty when none have been created in the current session.

The current `(database, table)` are resolved by UUID at query time, so they reflect `RENAME TABLE` and entries for dropped tables are hidden automatically.

<h2 id="columns">
  Columns
</h2>

* `database` ([String](/docs/reference/data-types/string)) — Database name
* `table` ([String](/docs/reference/data-types/string)) — Table name
* `name` ([String](/docs/reference/data-types/string)) — Projection name
* `type` ([Enum8('Normal' = 0, 'Aggregate' = 1)](/docs/reference/data-types/enum)) — Projection type
* `sorting_key` ([Array(String)](/docs/reference/data-types/array)) — Projection sorting key
* `query` ([String](/docs/reference/data-types/string)) — Projection SELECT query, empty for the INDEX ... TYPE ... form
* `definition` ([String](/docs/reference/data-types/string)) — Full projection declaration as written
* `settings` ([Map(String, String)](/docs/reference/data-types/map)) — Projection settings from WITH SETTINGS

**Example**

```sql theme={null}
CREATE HYPOTHETICAL PROJECTION p_by_b ON t (SELECT a, b ORDER BY b);
SELECT name, type, sorting_key FROM system.hypothetical_projections;
```

```text theme={null}
┌─name───┬─type───┬─sorting_key─┐
│ p_by_b │ Normal │ ['b']       │
└────────┴────────┴─────────────┘
```

<h2 id="see-also">
  See also
</h2>

* [`CREATE HYPOTHETICAL PROJECTION`](/docs/reference/statements/hypothetical-projection#create-hypothetical-projection)
* [`EXPLAIN WHATIF`](/docs/reference/statements/explain#explain-whatif)
