# Views

A view is a virtual table derived from one or more underlying database tables or views in the source system. A view can be defined via a direct SQL query and allows you to produce custom slices of data.

### Setup

The setup process is very similar to the process for [Tables](/configuration/creating-synthetic-databases/tables.md), except that you provide your own view alias and a SQL query to define the view's contents. The alias is how users will reference the view in queries — `SELECT a, b, c FROM <your_view_alias>` — and the SQL query will determine the schema and contents of the resulting relation.

#### SQL definitions

The SQL query will be executed directly against the source system, and should therefore be written in the source system's native dialect. Currently Subsalt only supports single-query views.

#### Immutability

Views are structurally immutable; you cannot modify the schema or reconfigure metadata once the view has been created. If you need to modify the structure of a view, you should delete and recreate it.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.subsalt.io/configuration/creating-synthetic-databases/views.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
